Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yoanm committed Aug 25, 2024
1 parent eaf7870 commit f86bd38
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/trigger-functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ on:
types: [completed]

concurrency:
group: "${{ github.workflow }}-${{ github.event.workflow_run.head_sha }}"
group: "${{ github.workflow }}-${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.pull_requests[0].number || github.event.workflow_run.head_sha }}"
cancel-in-progress: true

env:
TEST_BRANCH: ${{ github.event.workflow_run.head_branch }}
TARGET_SHA: ${{ github.event.workflow_run.head_sha }}
TEST_ID: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.pull_requests[0].number || github.event.workflow_run.head_sha }}

jobs:
tests:
name: Run functional tests
Expand All @@ -17,12 +22,9 @@ jobs:
- name: Trigger test repository worfklow
env:
GITHUB_TOKEN: ${{ secrets.FUNCTIONAL_TESTS_TRIGGER }}
BRANCH: ${{ github.event.workflow_run.head_branch }}
SHA: ${{ github.event.workflow_run.head_sha }}
TEST_ID: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.pull_requests[0]?.number || github.event.workflow_run.head_sha }}
run: |
gh workflow run functional-tests.yml \
--repo yoanm/gha-versioning-test-repo \
--ref "${BRANCH}" \
-f "sha=${SHA}" \
--ref "${TEST_BRANCH}" \
-f "sha=${TARGET_SHA}" \
-f "test-id=${TEST_ID}"

0 comments on commit f86bd38

Please sign in to comment.