Skip to content

Commit 367f1c9

Browse files
committed
ci: run build-test-push on all PRs, not just same-repo
Fork PRs previously skipped the build-test-push job entirely, preventing contributors from getting build and test feedback. Removing the same-repo restriction lets all PRs run the pipeline. The DockerHub push step was already guarded by credential checks, and a guard was added to the GHCR push step to prevent failures on forks where GITHUB_TOKEN is read-only.
1 parent 5a3dcfc commit 367f1c9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: pre-commit/action@v1.0.1
2626

2727
build-test-push:
28-
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
28+
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.event_name == 'pull_request'
2929
runs-on: ubuntu-latest
3030
needs: pre-commit
3131
permissions:
@@ -98,6 +98,7 @@ jobs:
9898
REGISTRY_USERNAME: ${{ env.DOCKERHUB_LOGIN }}
9999
run: ./hooks/push
100100
- name: Push Docker Image to GitHub Registry
101+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
101102
env:
102103
REGISTRY_HOST: ghcr.io
103104
REGISTRY_TOKEN: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)