From 2e7d3e8f4822ebbe28c3aab33dcebd858e2bae31 Mon Sep 17 00:00:00 2001 From: Will O'Beirne Date: Thu, 14 Sep 2023 14:50:10 -0500 Subject: [PATCH] ci: push image on tag starting with v --- .github/workflows/gateway-ui.yml | 4 ++-- .github/workflows/guardian-ui.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gateway-ui.yml b/.github/workflows/gateway-ui.yml index 9a4da98ae..96896d940 100644 --- a/.github/workflows/gateway-ui.yml +++ b/.github/workflows/gateway-ui.yml @@ -30,7 +30,7 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=sha - name: Login to Docker Hub - if: ${{ github.ref == 'refs/heads/master' }} + if: github.ref == 'refs/heads/master' || (github.ref_type == 'tag' && startsWith(github.ref, 'v')) uses: docker/login-action@v2 with: username: fedimintui @@ -39,6 +39,6 @@ jobs: uses: docker/build-push-action@v4 with: file: Dockerfile.gateway-ui - push: ${{ github.ref == 'refs/heads/master' }} + push: ${{ github.ref == 'refs/heads/master' || (github.ref_type == 'tag' && startsWith(github.ref, 'v')) }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/guardian-ui.yml b/.github/workflows/guardian-ui.yml index 123289040..a639ba12d 100644 --- a/.github/workflows/guardian-ui.yml +++ b/.github/workflows/guardian-ui.yml @@ -29,7 +29,7 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=sha - name: Login to Docker Hub - if: ${{ github.ref == 'refs/heads/master' }} + if: github.ref == 'refs/heads/master' || (github.ref_type == 'tag' && startsWith(github.ref, 'v')) uses: docker/login-action@v2 with: username: fedimintui @@ -38,6 +38,6 @@ jobs: uses: docker/build-push-action@v4 with: file: Dockerfile.guardian-ui - push: ${{ github.ref == 'refs/heads/master' }} + push: ${{ github.ref == 'refs/heads/master' || (github.ref_type == 'tag' && startsWith(github.ref, 'v')) }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}