From e97b45a43b59f5e6bebd31bb3c190496aaf15f2b Mon Sep 17 00:00:00 2001 From: Chun-Hung Tseng Date: Wed, 25 Sep 2024 11:09:21 +0200 Subject: [PATCH] Generate docker images with and without prefixed v for tagged commits --- .github/workflows/build-image.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 3606d9fb..af13216a 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -39,8 +39,9 @@ jobs: type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} # (for all commits) generate a tag named sha-[short sha value] type=sha,enable=true - # (for tagged commits only) generate a tag identical to the git tag string, including the leading v + # (for tagged commits only) generate tags identical to the git tag version, with and without the leading v type=semver,pattern={{raw}},enable=${{startsWith(github.ref, 'refs/tags/v')}} + type=semver,pattern={{version}},enable=${{startsWith(github.ref, 'refs/tags/v')}} - name: Build and push uses: docker/build-push-action@v6 with: