-
Notifications
You must be signed in to change notification settings - Fork 107
ci: publish Docker images to GHCR on release #233
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
Conversation
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.
Pull request overview
This PR extends the Docker workflow to publish bpftool container images to GitHub Container Registry (GHCR) when version tags are pushed or changes are merged to the main branch. It adds multi-architecture support (amd64/arm64) and build caching while preserving the existing PR testing workflow.
Changes:
- Add trigger for version tags and configure GHCR publishing on push events
- Add multi-architecture build support with Docker Buildx and QEMU
- Add build caching using GitHub Actions cache for improved build performance
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bf3e855 to
4e6a4cc
Compare
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4e6a4cc to
cb04af6
Compare
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@qmonnet |
qmonnet
left a comment
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.
Well I triggered a review from Copilot to see if it would catch anything interesting, but I haven't done my own review yet 😅
It looks good overall, but given that we don't reuse any step between the two cases (testing for PR vs. pushing a new image), why not make them separate jobs? It would avoid keeping the conditions for github.event_name being a PR at every step. (The linter is shared but it's small enough that we can duplicate it; we probably don't need it for pushing images by the way, especially because it runs after the image is built and pushed). What do you think?
Extend the existing docker workflow to push images to GitHub Container Registry (ghcr.io/libbpf/bpftool) when a new tag is pushed or when changes are merged to main. - Add trigger for version tags (v*.*.*) - Add GHCR login and push steps - Add multi-arch build support (linux/amd64, linux/arm64) - Add build caching using GitHub Actions cache - Add automatic latest tag management with semantic version comparison - Split workflow into separate jobs for testing (PR) and publishing (release) Link: libbpf#232 Signed-off-by: Gyutae Bae <gyutae.bae@navercorp.com>
cb04af6 to
8fa08a7
Compare
qmonnet
left a comment
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.
Looks good, thank you!
Do I need to set up anything for ghcr.io before the workflow runs, or will it automatically create the new image repository on the first run?
@qmonnet |
|
OK thank you let's merge it then 👍 |
|
@qmonnet |
|
@qmonnet
|
@qmonnet It doesn't affect functionality, but if you want to remove it for a cleaner look, I can disable attestations in the workflow: |
Good catch, thank you. I don't have sufficient permissions in the
Oh right, got it thanks! No problem, let's keep them. |
|
Daniel changed the setting, it's visible now 🎉 |
|
@qmonnet |

Summary
Extend the existing docker workflow to push images to GitHub Container Registry (ghcr.io/libbpf/bpftool) when a new tag is pushed or when changes are merged to main.
Behavior
maintagTest