From 12028a4e5d51daa725cef707aca94eb5c9496bf8 Mon Sep 17 00:00:00 2001 From: Jekabs Karklins <58165815+jekabs-karklins@users.noreply.github.com> Date: Fri, 2 Dec 2022 17:46:25 +0100 Subject: [PATCH] Update build-release.yaml --- .github/workflows/build-release.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index d38fe058..2c9e1bef 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -2,6 +2,8 @@ name: Build release on: release: + tags: + - 'v*' types: - created @@ -25,8 +27,11 @@ jobs: uses: docker/metadata-action@v4 with: images: ghcr.io/${{ github.repository }} - flavor: latest=true # adds :latest tag to outputs.tags - tags: type=sha,format=long,prefix= # adds : output to outputs.tags + flavor: latest=false + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=stable,enable=${{startsWith(github.ref, 'refs/tags/v')}} + type=ref,event=tag - name: Build and push uses: docker/build-push-action@v2