-
Notifications
You must be signed in to change notification settings - Fork 8
34 lines (32 loc) · 1.01 KB
/
pull_requests.yaml
File metadata and controls
34 lines (32 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Pull Requests
on:
# internal PRs need no trigger:
push:
branches:
- main
pull_request:
branches:
- main
# external PRs are triggered when labeled:
pull_request_target:
branches:
- main
types:
- labeled
jobs:
# only runs for pushes and non-fork pull requests
Internal:
uses: ./.github/workflows/tests.yaml
with:
sha: ${{ github.ref }}
secrets:
kubeflow_gcp_key: ${{ secrets.KUBEFLOW_V181_GCP_KEY }}
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork) }}
# only runs for forked pull requests, with 'ok-to-test' label
External:
uses: ./.github/workflows/tests.yaml
with:
sha: ${{ github.event.pull_request.head.sha }}
secrets:
kubeflow_gcp_key: ${{ secrets.KUBEFLOW_V181_GCP_KEY }}
if: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.fork && contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}