ci(gh-actions): fix tagging docker image #2646
Merged
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.
Context
Previously, the
push_docker_image
workflow tagged image incorrectly, tag for only one platform (not both linux/amd64 and linux/arm64). It was because of misunderstanding fordocker pull
anddocker tag
command.Solution
So I researched the way and I found
docker buildx imagetools create
command. It can create a new manifest list from manifest list with a tag. (docker manifest
cannot handle manifest list 😢)The following lines are my shell output when testing locally. Because their digests are same with the original manifest, I believe that its behavior is just retagging.
You can see the
moreal/9c-headless:333
in Docker Hubhttps://hub.docker.com/layers/moreal/9c-headless/333/images/sha256-7f4aafb09979d926bc3188e83aea43217987d9ab3bbe34378d9f7e53b2571e46?context=repo
References