diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 7d6de07..2670e79 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -29,17 +29,19 @@ jobs: permissions: contents: read packages: write + id-token: write steps: - name: Checkout repository uses: actions/checkout@v2 - - name: Log in to the Container registry + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} - password: ${{ secrets.GH_PACKAGE_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta