diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 3a3b311..5b7fc45 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -28,24 +28,22 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - # Install the cosign tool except on PR + # Install the cosign tool # https://github.com/sigstore/cosign-installer - name: Install cosign - if: github.event_name != 'pull_request' uses: sigstore/cosign-installer@v3.3.0 with: cosign-release: 'v2.2.2' # Workaround: https://github.com/docker/build-push-action/issues/461 - name: Setup Docker buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - # Login against a Docker registry except on PR + # Login against a Docker registry # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} - if: github.event_name != 'pull_request' uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c with: registry: ${{ env.REGISTRY }} @@ -64,10 +62,10 @@ jobs: # https://github.com/docker/build-push-action - name: Build and push Docker image id: build-and-push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: - context: "{{defaultContext}}:src" - push: ${{ github.event_name != 'pull_request' }} # Don't push on PR + context: "{{defaultContext}}" + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha