File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -39,26 +39,23 @@ jobs:
3939 type=semver,pattern=v{{version}}
4040 type=semver,pattern=v{{major}}.{{minor}}
4141
42- - name : Don't push to registry if this is a PR
43- if : github.event_name == 'pull_request'
44- run : |
45- echo "Not pushing the image to any container registry as this workflow is running on a pull request"
46- exit 0
47-
4842 - name : Log in to DockerHub
43+ if : github.event_name != 'pull_request'
4944 uses : docker/login-action@v2
5045 with :
5146 username : ${{ secrets.DOCKER_HUB_USERNAME }}
5247 password : ${{ secrets.DOCKER_HUB_TOKEN }}
5348
5449 - name : Log in to GHCR
50+ if : github.event_name != 'pull_request'
5551 uses : docker/login-action@v2
5652 with :
5753 registry : ghcr.io
5854 username : ${{ github.repository_owner }}
5955 password : ${{ secrets.GITHUB_TOKEN }}
6056
6157 - name : Build and push all platforms
58+ if : github.event_name != 'pull_request'
6259 uses : docker/build-push-action@v4
6360 with :
6461 push : true
You can’t perform that action at this time.
0 commit comments