Skip to content

Commit cc7f23f

Browse files
committed
Tidy up
1 parent 670e531 commit cc7f23f

1 file changed

Lines changed: 5 additions & 14 deletions

File tree

.github/actions/e2e-tests/action.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,22 @@ name: E2E tests
22
description: "Run end-to-end tests for this repo"
33

44
inputs:
5-
6-
targetEnvironment:
7-
description: Name of the environment under test
8-
required: true
5+
pr_number:
6+
required: true
7+
type: string
98

109
runs:
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."

0 commit comments

Comments
 (0)