docker: Don't push to the registry for Pull Requests

This requires more thought on how to handle secrets, and whether to just
omit it permanently.
This commit is contained in:
Tim Schumacher 2025-01-05 01:30:28 +01:00
parent d54711651b
commit 02ce8fdf0d

View file

@ -45,13 +45,14 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7,windows/amd64
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
pull: true
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
- name: Generate build provenance attestation
if: ${{ github.event_name != 'pull_request' }}
uses: actions/attest-build-provenance@v2
with:
subject-name: ghcr.io/${{ github.repository }}