Skip to content

Commit 073796a

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

File tree

2 files changed

+23
-0
lines changed

2 files changed

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

.github/workflows/on_schedule_tests.yaml

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

11+
# Runs when invoked by another workflow.
12+
workflow_call:
13+
secrets:
14+
APIFY_TEST_USER_API_TOKEN:
15+
required: true
16+
1117
concurrency:
1218
group: scheduled-tests
1319
cancel-in-progress: false

0 commit comments

Comments
 (0)