Skip to content

Commit

Permalink
workflow: Cancel workflows on push (cnti-testcatalog#2113)
Browse files Browse the repository at this point in the history
In our CICD, when new commit is pushed (or amended) while
workflow for old one is still running - there is no auto-cancelation.
Old workflows have to be canceled manually by maintainers
to avoid unneccessary waiting.

This change fixes that issue by grouping workflows by PR number or
branch ref (in case for push event), and if new workflow is ran in the
same group - old one would be automatically cancelled.

Signed-off-by: Konstantin Yarovoy <[email protected]>
  • Loading branch information
Konstantin authored Jul 26, 2024
1 parent d5027ff commit 73b1d44
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
- '!**.md'
- '!docs/*'
- '!doc-lint/*'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
tests:
name: Fetch Matrix Tests
Expand Down

0 comments on commit 73b1d44

Please sign in to comment.