diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 244497b..6101f9f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -29,17 +29,16 @@ jobs: tags: | type=sha - name: Login to GitHub Container Registry - if: github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.merged ) + if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build Docker Image and push - if: github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.merged ) uses: docker/build-push-action@v6 with: - push: true + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} context: .