From 21ae12fbcc68bbebbe3a53bad3048caef30996b8 Mon Sep 17 00:00:00 2001 From: Kamil Krzywicki Date: Wed, 14 Feb 2024 08:00:59 +0100 Subject: [PATCH] docker container will be build on every run, but pushed only on tags --- .github/workflows/push.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 2c9b6d8..1b108e7 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -30,7 +30,6 @@ jobs: env: REGISTRY: "${{ github.repository == 'uswitch/vault-creds' && 'quay.io' || 'ghcr.io' }}" IMAGE_NAME: "${{ github.repository == 'uswitch/vault-creds' && 'uswitch/vault-creds' || github.repository }}" - #if: github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/v') needs: [test, build] runs-on: ubuntu-latest steps: @@ -59,6 +58,6 @@ jobs: context: . labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64 - push: true + push: ${{ github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/v') }} tags: ${{ steps.meta.outputs.tags }} build-args: LDFLAGS=-X main.SHA=${{ github.sha }}