-
Notifications
You must be signed in to change notification settings - Fork 592
37 lines (34 loc) · 1.27 KB
/
e2e_trigger_via_label.yaml
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
35
36
37
name: trigger e2e (targeted) on label
on:
pull_request_target:
types:
- labeled
jobs:
check-permission:
uses: ./.github/workflows/_permission_check.yaml
if: contains(github.event.*.labels.*.name, 'ci/run-e2e')
secrets: inherit
trigger-e2e-tests-targeted:
timeout-minutes: ${{ fromJSON(vars.GHA_EXTENDED_TIMEOUT_MINUTES) }}
runs-on: ubuntu-latest
if: contains(github.event.*.labels.*.name, 'ci/run-e2e')
needs: check-permission
env:
GH_TOKEN: ${{ secrets.K8S_TEAM_BOT_GH_PAT }}
WORKFLOW: .github/workflows/e2e_targeted.yaml
BRANCH: ${{ github.event.pull_request.head.ref }}
PR_NUMBER: ${{ github.event.pull_request.number }}
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
# Do not run e2e tests on GKE-based clusters for specific PR, because currently
# there is no way to use an image built from PR's code for those tests.
# https://github.com/Kong/kubernetes-testing-framework/issues/587
- run: |
gh workflow run ${WORKFLOW} --ref ${BRANCH} \
-f run-gke=false \
-f run-istio=true \
-f all-supported-k8s-versions=true \
-f pr-number=${PR_NUMBER}