diff options
author | Brian Behlendorf <[email protected]> | 2024-09-24 09:02:01 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-09-24 09:02:01 -0700 |
commit | 4b5fbf70f2fe37d72152385276a30e95087d62fb (patch) | |
tree | 49cfd1d2d5e1661bb6741a41584d41b20dcdde32 | |
parent | d40d40913d33eb2d50cf363fa9f5022fc794cc9f (diff) |
CI: cancel workflows when PRs are updated (#16562)
For checkstyle, zloop, zfs-qemu, and codeql workflows cancel
in-progress jobs when the PR is updated.
Relevant GitHub Actions documentation:
The following concurrency group cancels in-progress jobs or run
on pull_request events only; if github.head_ref is undefined, the
concurrency group will fallback to the run ID, which is guaranteed
to be both unique and defined for the run.
https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #16562
-rw-r--r-- | .github/workflows/checkstyle.yaml | 4 | ||||
-rw-r--r-- | .github/workflows/codeql.yml | 4 | ||||
-rw-r--r-- | .github/workflows/zfs-qemu.yml | 5 | ||||
-rw-r--r-- | .github/workflows/zloop.yml | 4 |
4 files changed, 16 insertions, 1 deletions
diff --git a/.github/workflows/checkstyle.yaml b/.github/workflows/checkstyle.yaml index 088d28d52..b34ca1302 100644 --- a/.github/workflows/checkstyle.yaml +++ b/.github/workflows/checkstyle.yaml @@ -4,6 +4,10 @@ on: push: pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: checkstyle: runs-on: ubuntu-22.04 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f70f6bf86..2656a20fe 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -4,6 +4,10 @@ on: push: pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: analyze: name: Analyze diff --git a/.github/workflows/zfs-qemu.yml b/.github/workflows/zfs-qemu.yml index 18004c489..67d915adf 100644 --- a/.github/workflows/zfs-qemu.yml +++ b/.github/workflows/zfs-qemu.yml @@ -4,8 +4,11 @@ on: push: pull_request: -jobs: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true +jobs: qemu-vm: name: qemu-x86 strategy: diff --git a/.github/workflows/zloop.yml b/.github/workflows/zloop.yml index bf0762ff9..35d8cc977 100644 --- a/.github/workflows/zloop.yml +++ b/.github/workflows/zloop.yml @@ -4,6 +4,10 @@ on: push: pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: zloop: runs-on: ubuntu-24.04 |