@@ -4,8 +4,7 @@ permissions:
44 contents : read
55
66on :
7- pull_request_target :
8- types : [opened, synchronize, reopened]
7+ pull_request :
98
109concurrency :
1110 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2019 version : ${{ steps.get-version.outputs.version }}
2120 steps :
2221 - uses : actions/checkout@v4
23- with :
24- ref : ${{ github.event.pull_request.head.sha }}
2522
2623 - uses : actions/setup-node@v4
2724 with :
@@ -74,17 +71,12 @@ jobs:
7471 run : npm run test -w @repo/sandbox-container
7572
7673 # E2E tests against deployed worker
77- # For external PRs: requires manual approval via 'external-pr' environment
78- # For internal PRs: runs automatically without approval
7974 e2e-tests :
8075 needs : unit-tests
8176 timeout-minutes : 30
8277 runs-on : ubuntu-latest
83- environment : ${{ github.event.pull_request.head.repo.full_name != github.repository && 'external-pr' || null }}
8478 steps :
8579 - uses : actions/checkout@v4
86- with :
87- ref : ${{ github.event.pull_request.head.sha }}
8880
8981 - uses : actions/setup-node@v4
9082 with :
10597 - name : Set environment name
10698 id : env-name
10799 run : |
108- if [ "${{ github.event_name }}" = "pull_request_target " ]; then
100+ if [ "${{ github.event_name }}" = "pull_request " ]; then
109101 echo "env_name=pr-${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
110102 echo "worker_name=sandbox-e2e-test-worker-pr-${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
111103 else
@@ -163,7 +155,7 @@ jobs:
163155
164156 # Cleanup: Delete test worker and container (only for PR environments)
165157 - name : Cleanup test deployment
166- if : always() && github.event_name == 'pull_request_target '
158+ if : always() && github.event_name == 'pull_request '
167159 continue-on-error : true
168160 run : |
169161 cd tests/e2e/test-worker
0 commit comments