-
Notifications
You must be signed in to change notification settings - Fork 3.3k
ci: Add docker labels #771
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
base: main
Are you sure you want to change the base?
Conversation
@halkeye is attempting to deploy a commit to the Listinai Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe Docker build process in the GitHub Actions workflow was updated to include three OCI-compliant labels: image version with architecture, Git commit SHA, and repository URL. These metadata labels are now added during the image build without affecting other build parameters or logic. Changes
Possibly related PRs
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/build-containers.yml (2)
59-61
: Consider enriching OCI metadata with additional labels
Great addition oforg.opencontainers.image.version
,org.opencontainers.image.revision
, andorg.opencontainers.image.source
. To maximize compatibility with OCI-aware tools and provide richer context, you may also want to include these standard labels:
org.opencontainers.image.created
(build timestamp)org.opencontainers.image.title
/org.opencontainers.image.description
org.opencontainers.image.licenses
org.opencontainers.image.revision
(already present)Adding these will improve discoverability and auditing of your images.
52-63
: Evaluate usingdocker/metadata-action
for label management
Inline labels work well, but for long-term maintainability and consistency, consider switching todocker/metadata-action
. It can automatically generate and apply standard OCI labels and tags based on your workflow inputs—reducing custom shell logic and keeping your CI pipeline simpler.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/build-containers.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build-and-publish
yay ai agrees with me |
What kind of change does this PR introduce?
CI/Docker Image
Why was this change needed?
Tools like renovate and dependabot will show changelogs based on docker images. By having the opencontainer labels, PRs should include what changed since last docker deploy
Other information:
docker/metadata-action is a much better solution to make sure the image is populated with the right tags, but it involves some changes to the build script.
As a plan B, I would be up for updating the build scripts to be more like https://docs.docker.com/build/ci/github-actions/multi-platform/ (I could also update it to handle on push, so #704 could have forks build a docker image on prs, and docker image for dependabot prs on this repo)
Testable via docker inspect, or my preference regctl
vs
Checklist:
Put a "X" in the boxes below to indicate you have followed the checklist;
Summary by CodeRabbit