diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e17eee52..66894e06 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,6 +11,17 @@ on: branches: - master +# per https://www.meziantou.net/how-to-cancel-github-workflows-when-pushing-new-commits-on-a-branch.htm +# https://docs.github.com/en/actions/learn-github-actions/expressions +# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context +concurrency: + # github.workflow: name of the workflow + # github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + + # Cancel in-progress runs when a new workflow with the same group name is triggered + cancel-in-progress: true + jobs: windows: runs-on: windows-latest