diff --git a/.github/workflows/build-and-push-images.yaml b/.github/workflows/build-and-push-images.yaml index d42c4f5..2a36d1a 100644 --- a/.github/workflows/build-and-push-images.yaml +++ b/.github/workflows/build-and-push-images.yaml @@ -32,11 +32,7 @@ jobs: - name: Set Push Flag id: set-push run: | - if [[ "${{ github.event_name }}" == "push" && (${{ github.ref == 'refs/heads/main' }} || ${{ startsWith(github.ref, 'refs/tags/') }})]]; then - echo "push=true" >> $GITHUB_OUTPUT - else - echo "push=false" >> $GITHUB_OUTPUT - fi + echo "push=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}" >> $GITHUB_OUTPUT - name: Build And Publish Component ${{ matrix.component-name }} uses: ./.github/workflows/template-publish-image diff --git a/.github/workflows/template-publish-image/action.yaml b/.github/workflows/template-publish-image/action.yaml index 53f331b..c5f2743 100644 --- a/.github/workflows/template-publish-image/action.yaml +++ b/.github/workflows/template-publish-image/action.yaml @@ -141,10 +141,8 @@ runs: platforms: ${{ inputs.platforms }} context: ${{ inputs.context }} file: ${{ inputs.dockerfile }} - push: ${{ inputs.push }} + push: false tags: ${{ steps.meta.outputs.tags }} cache-from: type=gha,scope=${{ inputs.image }}-${{ github.workflow }} cache-to: type=gha,mode=max,scope=${{ inputs.image }}-${{ github.workflow }},ignore-error=true build-args: ${{ steps.build-args.outputs.args }} - pull: true - outputs: type=registry,compression=zstd,compression-level=3,force-compression=true \ No newline at end of file