diff --git a/.github/workflows/on_pull_request_fork.yaml.yml b/.github/workflows/on_pull_request_fork.yaml.yml new file mode 100644 index 0000000000..57e541ab9e --- /dev/null +++ b/.github/workflows/on_pull_request_fork.yaml.yml @@ -0,0 +1,17 @@ +on: + pull_request_target: + +jobs: + approve_e2e_tests_on_fork: + if: github.event.pull_request.head.repo.full_name != github.repository + environment: forks-PR + runs-on: ubuntu-latest + steps: + - name: Approve E2E tests + run: echo "Approved" + + run_e2e_tests: + needs: approve_e2e_tests_on_fork + uses: ./.github/workflows/on_schedule_tests.yaml + secrets: + APIFY_TEST_USER_API_TOKEN: ${{ secrets.APIFY_TEST_USER_API_TOKEN }} diff --git a/.github/workflows/on_schedule_tests.yaml b/.github/workflows/on_schedule_tests.yaml index 85bd076ab2..0237c2e852 100644 --- a/.github/workflows/on_schedule_tests.yaml +++ b/.github/workflows/on_schedule_tests.yaml @@ -8,6 +8,12 @@ on: schedule: - cron: '0 6 * * *' + # Runs when invoked by another workflow. + workflow_call: + secrets: + APIFY_TEST_USER_API_TOKEN: + required: true + concurrency: group: scheduled-tests cancel-in-progress: false