tools: github actions: prevent multiple concurrent workflow runs on the same branch/ref

- cancel other pending/in-progress workflows if a new commit is pushed to the ref
- ref. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
This commit is contained in:
nodiscc 2023-01-24 18:04:47 +01:00
parent fd8ff7a81e
commit 2745323ec8
No known key found for this signature in database
GPG key ID: 067FC4266A4B6909
2 changed files with 8 additions and 0 deletions

View file

@ -5,6 +5,10 @@ on:
branches: [ master ]
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-latest

View file

@ -5,6 +5,10 @@ on:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test_schedule:
runs-on: ubuntu-latest