diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 55d1314..a120f7a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,10 +7,11 @@ on: branches: [main] workflow_dispatch: -# This ensures that previous jobs for the PR are canceled when the PR is -# updated. +# Cancel a superseded run for the same pull request or branch. github.head_ref +# is only set on pull_request events, so keying on it alone put every push and +# manual run in one group, where they cancelled each other. concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true permissions: diff --git a/.github/workflows/ldap.yaml b/.github/workflows/ldap.yaml index 1bac577..c616010 100644 --- a/.github/workflows/ldap.yaml +++ b/.github/workflows/ldap.yaml @@ -7,10 +7,11 @@ on: branches: [main] workflow_dispatch: -# This ensures that previous jobs for the PR are canceled when the PR is -# updated. +# Cancel a superseded run for the same pull request or branch. github.head_ref +# is only set on pull_request events, so keying on it alone put every push and +# manual run in one group, where they cancelled each other. concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true permissions: