Skip to content

Commit 3459652

Browse files
committed
we should be using imagetools, not pull and tag
1 parent b3ab9e5 commit 3459652

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ jobs:
165165
- name: Checkout code
166166
uses: actions/checkout@v4
167167

168+
- name: Set up Docker Buildx
169+
uses: docker/setup-buildx-action@v3
170+
168171
- name: Login to GitHub Container Registry
169172
uses: docker/login-action@v3
170173
with:
@@ -184,7 +187,6 @@ jobs:
184187
185188
- name: Retag and push the image
186189
run: |
187-
docker pull "$DOCKER_APP_IMAGE"
188-
docker inspect "$DOCKER_APP_IMAGE"
189-
echo "$DOCKER_METADATA_OUTPUT_TAGS" | tr ' ' '\n' | xargs -n1 docker tag "$DOCKER_APP_IMAGE"
190-
docker push --all-tags "$(echo "$DOCKER_APP_IMAGE" | cut -f1 -d:)"
190+
docker buildx imagetools create \
191+
$(jq -cr '.tags | map("--tag " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
192+
"$(echo "$DOCKER_APP_IMAGE" | cut -f1 -d:)"

0 commit comments

Comments
 (0)