Skip to content

Commit a598d99

Browse files
committed
Add e2e test trigger for fork PRs. It has to be explicitly approved
1 parent 809f089 commit a598d99

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
on:
2+
pull_request_target:
3+
secrets:
4+
APIFY_TEST_USER_API_TOKEN:
5+
required: true
6+
7+
jobs:
8+
approve_e2e_tests_on_fork:
9+
if: github.event.pull_request.head.repo.full_name != github.repository
10+
environment: forks-PR
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Approve E2E tests
14+
run: echo "Approved"
15+
16+
run_e2e_tests:
17+
needs: approve_e2e_tests_on_fork
18+
uses: ./.github/workflows/on_schedule_tests.yaml
19+
secrets:
20+
APIFY_TEST_USER_API_TOKEN: ${{ secrets.APIFY_TEST_USER_API_TOKEN }}

.github/workflows/on_schedule_tests.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
schedule:
99
- cron: '0 6 * * *'
1010

11+
# Runs when invoked by another workflow.
12+
workflow_call:
13+
1114
concurrency:
1215
group: scheduled-tests
1316
cancel-in-progress: false

0 commit comments

Comments
 (0)