Skip to content
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

Push identical image to all Docker registries #445

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

bestbeforetoday
Copy link
Member

@bestbeforetoday bestbeforetoday commented Dec 4, 2024

The current GitHub Actions workflow builds and pushes separate Docker images for each registry. This results in the images published to each registry having a different hash, despite having the same version tag.

This change modifies the Docker publishing job in the release workflow so that a single step builds and publishes the same Docker image to all Docker registries. For reproducability, the timestamp of the image is also set to the last commit timestamp.

@bestbeforetoday bestbeforetoday marked this pull request as ready for review December 4, 2024 13:39
@bestbeforetoday bestbeforetoday requested a review from a team as a code owner December 4, 2024 13:39
@bestbeforetoday bestbeforetoday enabled auto-merge (squash) December 4, 2024 13:39
@bestbeforetoday bestbeforetoday changed the title Docker publish Push identical image to all Docker registries Dec 4, 2024
Copy link
Contributor

@denyeart denyeart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea on using the same hash on both images!

I guess we should do this for all repositories?

.github/workflows/release.yaml Outdated Show resolved Hide resolved
The current GitHub Actions workflow builds and pushes separate Docker
images for each registry. This results in the images published to each
registry having a different hash, despite having the same version tag.

This change modifies the Docker publishing job in the release workflow
so that a single step builds and publishes the same Docker image to all
Docker registries. For reproducability, the timestamp of the image is
also set to the last commit timestamp.

Signed-off-by: Mark S. Lewis <[email protected]>
Copy link
Contributor

@denyeart denyeart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, it makes it much easier to understand upon a quick scan.

I assume we should make a similar update in all the repositories that push to both?

@bestbeforetoday bestbeforetoday merged commit 78542b4 into hyperledger:main Dec 4, 2024
8 checks passed
@bestbeforetoday
Copy link
Member Author

I assume we should make a similar update in all the repositories that push to both?

I have made a similar change for review in hyperledger/fabric-chaincode-java#368.

@bestbeforetoday bestbeforetoday deleted the docker-publish branch December 4, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants