From 00d412aca4a05c4e5867f6e93febea1c4430d0d5 Mon Sep 17 00:00:00 2001 From: Stig Otnes Kolstad Date: Mon, 19 Jun 2023 13:19:31 +0200 Subject: [PATCH] fix: prevent registry operations when not logged in --- .github/workflows/workflow.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 1ea1498..ce8e673 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -279,7 +279,7 @@ jobs: type=raw,value=latest,enable=${{ inputs.tag-latest }} ${{ steps.additional-tags.outputs.tags }} - - if: inputs.push + if: inputs.push && steps.setup.outputs.docker_login == 'yes' name: Docker login uses: docker/login-action@v2 with: @@ -287,7 +287,7 @@ jobs: username: ${{ secrets.registry-username }} password: ${{ secrets.registry-password }} - - if: inputs.push + if: inputs.push && steps.setup.outputs.docker_login == 'yes' name: Push tags id: push run: |