File tree Expand file tree Collapse file tree
.github/actions/e2e-tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,31 +2,22 @@ name: E2E tests
22description : " Run end-to-end tests for this repo"
33
44inputs :
5-
6- targetEnvironment :
7- description : Name of the environment under test
8- required : true
5+ pr_number :
6+ required : true
7+ type : string
98
109runs :
1110 using : " composite"
1211
1312 steps :
14-
15- - name : " Set PR NUMBER"
16- shell : bash
17- run : |
18- echo "PR_NUMBER=${{ inputs.targetEnvironment }}" >> $GITHUB_ENV
19-
2013 - name : Check if e2e tests should run
2114 id : check_e2e
2215 shell : bash
2316 env :
2417 GITHUB_TOKEN : ${{ env.GITHUB_TOKEN }}
2518 run : |
26- # Extract PR number from environment name
27- if [[ "${{ inputs.targetEnvironment }}" =~ ^pr([0-9]+)$ ]]; then
28- pr_number="${BASH_REMATCH[1]}"
29- labels=$(gh pr view "$pr_number" --json labels --jq '.labels[].name' 2>/dev/null || echo "")
19+ if [[ -n "${{ inputs.pr_number }}" ]]; then
20+ labels=$(gh pr view "${{ inputs.pr_number }" --json labels --jq '.labels[].name' 2>/dev/null || echo "")
3021
3122 if echo "$labels" | grep -Fxq 'deploy-proxy'; then
3223 echo "deploy-proxy label found; e2e tests will run."
You can’t perform that action at this time.
0 commit comments