Skip to content

Commit

Permalink
chore(ci): fix concurrency group format on pull request event
Browse files Browse the repository at this point in the history
Since the addition of pull_request_target event, github.ref context
object return name of the base branch. So when a workflow was
triggered on the base branch during an execution in a pull request,
the latter would be cancelled.
Using github.head_ref, when available, fixes this behavior.
On any other event than pull_request or pull_request_target,
github.ref will still be used and work as before.
  • Loading branch information
soonum committed Jan 3, 2025
1 parent a9d48c7 commit 9c43c30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/aws_tfhe_fast_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
(github.event_name == 'pull_request' && needs.setup-instance.result != 'skipped')
needs: [ should-run, setup-instance ]
concurrency:
group: ${{ github.workflow }}_${{ github.ref }}
group: ${{ github.workflow }}_${{ github.head_ref || github.ref }}
cancel-in-progress: true
runs-on: ${{ needs.setup-instance.outputs.runner-name }}
steps:
Expand Down

0 comments on commit 9c43c30

Please sign in to comment.