Skip to content

Commit 332ce2c

Browse files
committed
Skip steps individually instead of bailing out
`exit 0` does not bail out early it seems: https://github.com/matrix-org/rust-synapse-compress-state/actions/runs/16961790179/job/48076133728 We have to individually skip every step instead.
1 parent 231e44a commit 332ce2c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/docker.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)