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

HDDS-11634. Publish images to Docker Hub from GitHub workflow #33

Merged
merged 3 commits into from
Nov 8, 2024

Conversation

adoroszlai
Copy link
Contributor

@adoroszlai adoroszlai commented Nov 7, 2024

What changes were proposed in this pull request?

Publish ozone-runner Docker images created by the CI workflow to Docker Hub, in addition to existing practice.

Only publish images with tags, not by Git commit SHA (the latter is used only for GitHub Container Registry).

Publishing to Docker Hub is optional, only done if the secrets are defined for the repo. This way the workflow is still functional in forks whose owners have not set up Docker Hub repository. (Example run before I set up secrets in my fork.)

https://issues.apache.org/jira/browse/HDDS-11634

How was this patch tested?

git tag test-HDDS-11634
git push adoroszlai test-HDDS-11634

Workflow published the image to both GitHub and Docker Hub.

Secrets set by Apache Infra on this repo will be tested when this is merged and the commit tagged.

Once we confirm this to be working, we can ask Infra to disable the Docker Hub automated build.

@adoroszlai adoroszlai self-assigned this Nov 7, 2024
@adoroszlai adoroszlai marked this pull request as draft November 7, 2024 10:18
@adoroszlai
Copy link
Contributor Author

I just noticed that the image pushed by tag only has amd64 platform. Will reopen this once I fix that.

@adoroszlai adoroszlai closed this Nov 7, 2024
@adoroszlai adoroszlai reopened this Nov 7, 2024
@adoroszlai
Copy link
Contributor Author

adoroszlai commented Nov 7, 2024

Fixed tagging of multi-arch images: ghcr.io, hub.docker.com.

Reference:
https://docs.docker.com/build/ci/github-actions/copy-image-registries/

@adoroszlai adoroszlai marked this pull request as ready for review November 7, 2024 11:21
.github/workflows/build-and-tag.yaml Outdated Show resolved Hide resolved
Co-authored-by: Siyao Meng <[email protected]>
@adoroszlai adoroszlai merged commit c36597a into apache:master Nov 8, 2024
1 check passed
@adoroszlai adoroszlai deleted the HDDS-11634 branch November 8, 2024 05:47
@adoroszlai
Copy link
Contributor Author

Thanks @smengcl for the review.

@smengcl
Copy link
Contributor

smengcl commented Nov 8, 2024

Thanks @adoroszlai for the patch!

adoroszlai added a commit that referenced this pull request Nov 12, 2024
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