[skip ci] Use concurrency to cancel duplicate workflow runs

This commit is contained in:
arkon 2022-08-15 15:30:38 -04:00
parent 4b0c3a8a05
commit 45e9ef7eab
3 changed files with 8 additions and 22 deletions

View File

@ -5,6 +5,10 @@ on:
paths-ignore:
- '**.md'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
CI_CHUNK_SIZE: 65

View File

@ -7,6 +7,10 @@ on:
paths-ignore:
- '**.md'
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
env:
CI_CHUNK_SIZE: 65
@ -20,12 +24,6 @@ jobs:
env:
CI_MODULE_GEN: true
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
all_but_latest: true
- name: Clone repo
uses: actions/checkout@v3

View File

@ -1,16 +0,0 @@
name: Cancel old pull request workflows
on:
workflow_run:
workflows: ["PR build check"]
types:
- requested
jobs:
cancel:
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.9.1
with:
workflow_id: ${{ github.event.workflow.id }}
all_but_latest: true