Skip to content

Commit 79a83f5

Browse files
authored
Update the condtion to build latest (#1294)
This condition ensures that the manifest creation only occurs for tags that start with `refs/tags/v` and do not include `a`, `b`, or `rc`.
1 parent bf0f516 commit 79a83f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/docker-build-upload.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,16 @@ jobs:
204204
BASE_TAG="${{ needs.build-amd.outputs.base_tags_dockerhub }}"
205205
docker buildx imagetools create -t ${BASE_TAG} ${BASE_TAG}-amd ${BASE_TAG}-arm
206206
207-
# Create a “latest” manifest only if the tag is a proper release (not alpha)
207+
# Create a “latest” manifest only if the tag is a proper release (not a)
208208
- name: Create and push manifest for GHCR latest
209-
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'alpha')
209+
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'a') && !contains(github.ref, 'b') && !contains(github.ref, 'rc')
210210
run: |
211211
docker buildx imagetools create -t ghcr.io/${{ env.IMAGE_NAME }}:latest \
212212
${{ needs.build-amd.outputs.base_tags_ghcr }}-amd \
213213
${{ needs.build-amd.outputs.base_tags_ghcr }}-arm
214214
215215
- name: Create and push manifest for DockerHub latest
216-
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'alpha')
216+
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'a') && !contains(github.ref, 'b') && !contains(github.ref, 'rc')
217217
run: |
218218
docker buildx imagetools create -t docker.io/${{ env.IMAGE_NAME }}:latest \
219219
${{ needs.build-amd.outputs.base_tags_dockerhub }}-amd \

0 commit comments

Comments
 (0)