-
Notifications
You must be signed in to change notification settings - Fork 370
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 Antrea Ubuntu-based images to ghcr.io #6834
base: main
Are you sure you want to change the base?
Push Antrea Ubuntu-based images to ghcr.io #6834
Conversation
The Github Container Registry (ghcr.io) is introduced as an alternative to Docker Hub for users. There is no change to how images are pushed to Docker Hub, but antrea/antrea-agent-ubuntu and antrea/antrea-controller-ubuntu are now also available in ghcr.io, as antrea-io/antrea-agent-ubuntu and antrea-io/antrea-controller-ubuntu respectively. We do not retroactively push previously-released images to ghcr.io. Antrea v2.3 will be the first release also available in ghcr.io. In the future, we may also push UBI-based images to ghcr.io. Fixes antrea-io#6454 Signed-off-by: Antonin Bas <[email protected]>
Tested with this branch: https://github.com/antrea-io/antrea/tree/push-antrea-ubuntu-images-to-ghcr.io-test See uploaded packages (with |
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.
two nits
does ghrc.io support anonymous pulling? I got following error:
docker pull ghcr.io/antrea-io/antrea-controller-ubuntu-amd64:test-latest
Error response from daemon: Head "https://ghcr.io/v2/antrea-io/antrea-controller-ubuntu-amd64/manifests/test-latest": unauthorized
.github/workflows/build.yml
Outdated
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push Antrea Docker image to registries |
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.
- name: Build and push Antrea Docker image to registries | |
- name: Build and push Antrea Docker images to registries |
.github/workflows/build_tag.yml
Outdated
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Push Antrea Ubuntu Docker image to registries |
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.
ditto
.github/workflows/build_tag.yml
Outdated
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Login to Github Container Registry | ||
if: ${{ needs.check-env.outputs.push_needed == 'true' && matrix.registry == "ghcr.io" }} |
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.
Wrapping string with double quotes will result in error: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#literals
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.
Thanks for catching this, don't know how I missed just that one
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.
This tool probably can help to catch the syntax error with dry-run mode: https://github.com/nektos/act
Signed-off-by: Antonin Bas <[email protected]>
@tnqn @luolanzone thanks for the reviews
Yes, but I had to make all the packages public. It's done now and pulls should work. |
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.
LGTM
The Github Container Registry (ghcr.io) is introduced as an alternative to Docker Hub for users. There is no change to how images are pushed to Docker Hub, but antrea/antrea-agent-ubuntu and
antrea/antrea-controller-ubuntu are now also available in ghcr.io, as antrea-io/antrea-agent-ubuntu and antrea-io/antrea-controller-ubuntu respectively.
We do not retroactively push previously-released images to ghcr.io. Antrea v2.3 will be the first release also available in ghcr.io.
In the future, we may also push UBI-based images to ghcr.io.
Fixes #6454