Skip to content

Commit d79dcd8

Browse files
authored
avoid tag conflict with fetch-tags: true on docker release (#404)
1 parent 288950e commit d79dcd8

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/docker.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- "master"
7-
- "*" # TEMPORARY FOR TESTING
87
tags:
98
- "v*"
109
pull_request:
@@ -269,10 +268,14 @@ jobs:
269268
manifest_digest: ${{ steps.manifest_digest.outputs.digest }}
270269
tag: ${{ steps.compute_tag.outputs.tag }}
271270
steps:
272-
- name: Checkout
271+
- name: Checkout full history (no tags yet)
273272
uses: actions/checkout@v4
274273
with:
275-
fetch-tags: true
274+
fetch-depth: 0 # full history
275+
# keep fetch-tags off to avoid the conflict on tag events
276+
277+
- name: Fetch tags
278+
run: git fetch --tags --force
276279

277280
- name: Set up Docker Buildx
278281
uses: docker/setup-buildx-action@v3
@@ -438,7 +441,11 @@ jobs:
438441
- name: Checkout
439442
uses: actions/checkout@v4
440443
with:
441-
fetch-tags: true
444+
fetch-depth: 0 # full history
445+
# keep fetch-tags off to avoid the conflict on tag events
446+
447+
- name: Fetch tags
448+
run: git fetch --tags --force
442449

443450
- name: Force refresh mutable tags
444451
if: startsWith(github.ref, 'refs/tags/riverproui/v')

0 commit comments

Comments
 (0)