Skip to content

Commit 7fd5815

Browse files
authored
prevent false negatives in tag filter by using ref_name (#1296)
Use `github.ref_name` instead of `github.ref` to avoid matching unwanted characters from the static 'refs/tags/' prefix when filtering out pre-releases (a, b, rc).
1 parent bbce9db commit 7fd5815

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ jobs:
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, 'a') && !contains(github.ref, 'b') && !contains(github.ref, 'rc')
216+
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, 'a') && !contains(github.ref_name, 'b') && !contains(github.ref_name,
217+
'rc')
217218
run: |
218219
docker buildx imagetools create -t docker.io/${{ env.IMAGE_NAME }}:latest \
219220
${{ needs.build-amd.outputs.base_tags_dockerhub }}-amd \

0 commit comments

Comments
 (0)