Revert "ci: push image to GHCR for pull_request event" (#4865)

Reverts halo-dev/halo#4588

According to https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#using-secrets-in-a-workflow, we cannot obtain secrets in pull requests, so that we are not able to push docker image for every pull request.

```release-note
None
```
pull/4864/head^2
John Niang 2023-11-16 16:36:07 +08:00 committed by GitHub
parent c5dd569aa7
commit a0ea21175c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -72,5 +72,5 @@ jobs:
ghcr-token: ${{ secrets.GHCR_TOKEN }}
dockerhub-user: ${{ secrets.DOCKER_USERNAME }}
dockerhub-token: ${{ secrets.DOCKER_TOKEN }}
push: ${{ github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'release' }}
push: ${{ github.event_name == 'push' || github.event_name == 'release' }} # we only push to GHCR if the push is to the next branch
console-ref: ${{ github.event_name == 'release' && github.ref || 'main' }}