ci: use docker/metadata-action to gather tags/labels #2033
Merged
v1v merged 2 commits intoelastic:mainfrom May 7, 2024
Merged
Conversation
xrmx
reviewed
Apr 29, 2024
Member
xrmx
left a comment
There was a problem hiding this comment.
Are we publishing to docker at each merge to main?
Member
Author
That's correct, it was added in #1998 The tag is |
xrmx
previously approved these changes
Apr 29, 2024
v1v
commented
Apr 29, 2024
v1v
commented
Apr 29, 2024
6 tasks
v1v
commented
Apr 30, 2024
| ${{ 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 }} |
Member
Author
There was a problem hiding this comment.
This will add some labels to the docker image using the open-containers standard
Member
Author
There was a problem hiding this comment.
We discussed a bit further about this in elastic/apm-agent-nodejs#3998 (comment)
v1v
commented
Apr 30, 2024
| images: ${{ env.DOCKER_IMAGE_NAME }} | ||
| tags: | | ||
| type=raw,value=latest,prefix=test-,enable={{is_default_branch}} | ||
| type=semver,pattern={{version}} |
Member
Author
There was a problem hiding this comment.
This will use the version when a tag as explained in https://github.com/docker/metadata-action/tree/8e5442c4ef9f78752691e2d8f8d19755c6f78e81/?tab=readme-ov-file#semver
reakaleek
approved these changes
May 6, 2024
xrmx
pushed a commit
to xrmx/apm-agent-python
that referenced
this pull request
May 17, 2024
xrmx
pushed a commit
to xrmx/apm-agent-python
that referenced
this pull request
May 20, 2024
xrmx
pushed a commit
that referenced
this pull request
May 24, 2024
xrmx
pushed a commit
to xrmx/apm-agent-python
that referenced
this pull request
Jun 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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