-
Notifications
You must be signed in to change notification settings - Fork 220
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
ci: use docker/metadata-action to gather tags/labels #2033
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.
Are we publishing to docker at each merge to main?
That's correct, it was added in #1998 The tag is |
${{ env.DOCKER_IMAGE_NAME }}:${{ steps.setup-docker.outputs.tag }} | ||
${{ env.DOCKER_IMAGE_NAME }}:${{ steps.setup-docker.outputs.latest }} | ||
tags: ${{ steps.docker-meta.outputs.tags }} | ||
labels: ${{ steps.docker-meta.outputs.labels }} |
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 will add some labels to the docker image using the open-containers standard
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.
We discussed a bit further about this in elastic/apm-agent-nodejs#3998 (comment)
images: ${{ env.DOCKER_IMAGE_NAME }} | ||
tags: | | ||
type=raw,value=latest,prefix=test-,enable={{is_default_branch}} | ||
type=semver,pattern={{version}} |
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 will use the version when a tag as explained in https://github.com/docker/metadata-action/tree/8e5442c4ef9f78752691e2d8f8d19755c6f78e81/?tab=readme-ov-file#semver
What does this pull request do?
Use https://github.com/docker/metadata-action/tree/8e5442c4ef9f78752691e2d8f8d19755c6f78e81/?tab=readme-ov-file#typeref to get the tags/annotations/labels
Use sha commit for the github action related to docker.
Test
See https://github.com/elastic/apm-agent-python/actions/runs/8879068667
Related issues
elastic/apm-agent-nodejs#3998