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

Use the docker/metadata-action GitHub Action to generate our image metadata #207

Merged
merged 2 commits into from
Jan 12, 2025

Conversation

mcdonnnj
Copy link
Member

🗣 Description

This pull request switches from using our own metadata generation to using the docker/metadata-action GitHub Action.

💭 Motivation and context

Instead of rolling our own solution to generating the appropriate labels and tags to apply to our Docker image configurations it make sense to leverage a tool managed by Docker.

🧪 Testing

Automated tests pass. I checked the image on Docker Hub and saw the expected tags. I pulled the branch tag and inspected the image to verify the expected image labels.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

@mcdonnnj mcdonnnj added improvement This issue or pull request will add or improve functionality, maintainability, or ease of use github-actions Pull requests that update GitHub Actions code labels Jan 10, 2025
@mcdonnnj mcdonnnj requested a review from a team January 10, 2025 20:11
@mcdonnnj mcdonnnj self-assigned this Jan 10, 2025
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

That looks a lot simpler 👍

@mcdonnnj mcdonnnj added the kraken 🐙 This pull request is ready to merge during the next Lineage Kraken release label Jan 10, 2025
@mcdonnnj mcdonnnj added this pull request to the merge queue Jan 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Jan 12, 2025
Switch to using the docker/metadata-action GitHub Action to generate
Docker image metadata. This replaces manually specifying the labels and
calculating appropriate tags. This approach will both be easier as well
as eliminate some of the issues we've had with manually calculating the
image tags.
Update the test configuration to only check the
org.opencontainers.image.version label on releases. We must make this
change because the docker/metadata-action will only populate the label
with an appropriate value on a release. Otherwise it will be the branch
that is sourced when building the image.
@mcdonnnj mcdonnnj force-pushed the improvement/use_metadata-action branch from c02089c to 5698c17 Compare January 12, 2025 07:58
@mcdonnnj mcdonnnj added this pull request to the merge queue Jan 12, 2025
Merged via the queue into develop with commit 7a5cddf Jan 12, 2025
17 checks passed
@mcdonnnj mcdonnnj deleted the improvement/use_metadata-action branch January 12, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-actions Pull requests that update GitHub Actions code improvement This issue or pull request will add or improve functionality, maintainability, or ease of use kraken 🐙 This pull request is ready to merge during the next Lineage Kraken release
Projects
Development

Successfully merging this pull request may close these issues.

4 participants