-
Notifications
You must be signed in to change notification settings - Fork 60.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix attest build provenance steps in publishing docker image examples #36263
base: main
Are you sure you want to change the base?
Conversation
Instead of using env.REGISTRY and env.IMAGE_NAME, which are not set, use the images in the metadata-action step. Fixes github#36243
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
👓 How to review these changesThank you for your contribution. To review these changes, you can: A Hubber will need to deploy your changes internally to review. Table of review linksThe table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
Many thanks @mmb — I'll just get this verified internally and should be able to get back to you soon. |
Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmb I’m happy to accept the changes at lines 119 and 232; however, I'm afraid the SMEs have rejected the second changes—this isn’t something we’ve seen come up as a problem anywhere, and the recommendation is that if you’re using artifact attestations with multiple registries, to attest once and cioy the container image (and attestation) from the first registry to the second registry, rather than attest twice to two different registries.
If you're happy to modify the changes to just the two lines, I'm happy to get this merged for you. Many thanks
Instead of using env.REGISTRY and env.IMAGE_NAME, which are not set, use the images in the metadata-action step.
Fixes #36243
Why:
Closes: #36243
What's being changed (if available, include any code snippets, screenshots, or gifs):
The image publishing example workflows use
env.REGISTRY
andenv.IMAGE_NAME
which I found confusing because they are not set. I changed them to use the image names that are already used elsewhere in the same workflows.In the example that pushes an image to both Docker Hub and GitHub I added an attestation step for Docker Hub to show how to create attestations in multiple registries.
Check off the following: