diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index ff588bc3..de89edba 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -89,12 +89,16 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v3 + # skip for pull requests + if: ${{ github.event_name != 'pull_request' }} with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Login to GHCR uses: docker/login-action@v3 + # skip for pull requests + if: ${{ github.event_name != 'pull_request' }} with: registry: ghcr.io username: ${{ github.actor }} @@ -102,6 +106,8 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v3 + # skip for pull requests + if: ${{ github.event_name != 'pull_request' }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -114,7 +120,6 @@ jobs: labels: ${{ steps.meta.outputs.labels }} annotations: ${{ steps.meta.outputs.annotations }} outputs: type=image,"name=${{ env.DOCKERHUB_REPO }},${{ env.GHCR_REPO }}",push-by-digest=true,name-canonical=true,"push=${{ github.event_name != 'pull_request' }}","annotation-index.org.opencontainers.image.description=${{ env.EOS_REPO_DESCRIPTION }}" - #push: ${{ github.event_name != 'pull_request' }} - name: Generate artifact attestation DockerHub uses: actions/attest-build-provenance@v2