Skip to content

Commit 153dd38

Browse files
committed
fix(ci): skip integration tests for fork PRs
Fork PRs do not have access to repository secrets. The integration-tests job calls JSON.parse(process.env.INTEGRATION_CERTS) which crashes with an empty string, causing 24 out of 30 jobs to fail immediately. Skip the entire integration-tests job for fork PRs by checking that the head repo matches the base repo, using the same pattern already used in the check-permissions job.
1 parent 596fcd1 commit 153dd38

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,9 @@ jobs:
274274

275275
integration-tests:
276276
needs: [check-permissions, build-packages]
277-
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
277+
if: >-
278+
${{ (github.event_name != 'pull_request' || github.event.pull_request.draft == false)
279+
&& (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
278280
name: Integration Tests (${{ matrix.test-name }}, ${{ matrix.test-project }}${{ matrix.next-version && format(', {0}', matrix.next-version) || '' }})
279281
permissions:
280282
contents: read

0 commit comments

Comments
 (0)