Skip to content

Commit 2fc9f1c

Browse files
MichaelGHSegclaude
andauthored
Update e2e-tests CI: skip fork PRs, accept test ref input (#534)
- Skip e2e tests on fork PRs (no access to repo secrets) - Accept e2e_tests_ref input for cross-repo test validation Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8585e31 commit 2fc9f1c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@ on:
1313
branches: [main, master]
1414
pull_request:
1515
branches: [main, master]
16-
workflow_dispatch: # Allow manual trigger
16+
workflow_dispatch:
17+
inputs:
18+
e2e_tests_ref:
19+
description: 'Branch or ref of sdk-e2e-tests to use'
20+
required: false
21+
default: 'main'
1722

1823
jobs:
1924
e2e-tests:
25+
# Skip on fork PRs where repo secrets aren't available
26+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
2027
runs-on: ubuntu-latest
2128

2229
steps:
@@ -29,6 +36,7 @@ jobs:
2936
uses: actions/checkout@v4
3037
with:
3138
repository: segmentio/sdk-e2e-tests
39+
ref: ${{ inputs.e2e_tests_ref || 'main' }}
3240
token: ${{ secrets.E2E_TESTS_TOKEN }}
3341
path: sdk-e2e-tests
3442

0 commit comments

Comments
 (0)