From 7f7fc737b39c71536d3fd75749970af2c4fe2e93 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Tue, 5 Oct 2021 18:48:54 +0200 Subject: [PATCH] Use a better switch mechanism for build type --- .github/workflows/containers.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 929ef5ab9..d40924b22 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -31,6 +31,7 @@ jobs: echo ${{ github.sha }} > changedetectionio/source.txt echo ${{ github.ref }} > changedetectionio/tag.txt echo Event name: ${{ github.event_name }} + echo Ref ${{ github.ref }} set - name: Set up QEMU @@ -62,7 +63,7 @@ jobs: - name: Build and push :latest id: docker_build - if: ${{ github.event_name != 'release'}} + if: ${{ github.ref == 'master'}} uses: docker/build-push-action@v2 with: context: ./ @@ -77,7 +78,7 @@ jobs: - name: Build and push :tag id: docker_build_tag_release - if: ${{ github.event_name == 'release'}} + if: startsWith(github.ref, 'refs/tags/0.') uses: docker/build-push-action@v2 with: context: ./