Skip to content

Commit 246b574

Browse files
cd: use github.event.release.tag_name (#955)
1 parent 7243a0d commit 246b574

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/cd.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ jobs:
5252
file: ${{ matrix.image.dockerfile || './build/package/Dockerfile' }}
5353
platforms: linux/amd64,linux/arm64
5454
build-args: |
55-
VERSION=${{ github.ref_name }}
55+
VERSION=${{ github.event.release.tag_name }}
5656
APP_IMAGE=${{ matrix.image.name }}
5757
tags: |
58-
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.ref_name }}${{ matrix.image.suffix }}
59-
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest${{ matrix.image.suffix }}
58+
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.event.release.tag_name }}${{ matrix.image.suffix }}
59+
${{ github.event.release.target_commitish == 'master' && format('ghcr.io/{0}/{1}:latest{2}', github.repository_owner, github.event.repository.name, matrix.image.suffix) || '' }}
6060
6161
build-playground:
6262
runs-on: ubuntu-latest
@@ -85,5 +85,5 @@ jobs:
8585
file: ./build/package/Dockerfile_playground
8686
platforms: linux/amd64,linux/arm64
8787
build-args: |
88-
VERSION=${{ github.ref_name }}
89-
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-playground:${{ github.ref_name }}
88+
VERSION=${{ github.event.release.tag_name }}
89+
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-playground:${{ github.event.release.tag_name }}

0 commit comments

Comments
 (0)