diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index 5e857e6..17a7e50 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -11,6 +11,11 @@ on: defaults: run: shell: bash +concurrency: + # Skip intermediate builds: all builds except for builds on the `main` branch + # Cancel intermediate builds: only pull request builds + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: example: runs-on: ${{ matrix.os }} diff --git a/.github/workflows/multiple_prs.yml b/.github/workflows/multiple_prs.yml index 1810cc3..eec7cb2 100644 --- a/.github/workflows/multiple_prs.yml +++ b/.github/workflows/multiple_prs.yml @@ -9,6 +9,11 @@ on: defaults: run: shell: bash +concurrency: + # Skip intermediate builds: all builds except for builds on the `main` branch + # Cancel intermediate builds: only pull request builds + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: multiple_prs: runs-on: ubuntu-latest diff --git a/.github/workflows/single_pr.yml b/.github/workflows/single_pr.yml index 1305e19..d98b0fc 100644 --- a/.github/workflows/single_pr.yml +++ b/.github/workflows/single_pr.yml @@ -9,6 +9,11 @@ on: defaults: run: shell: bash +concurrency: + # Skip intermediate builds: all builds except for builds on the `main` branch + # Cancel intermediate builds: only pull request builds + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: update_each_manifest: runs-on: ubuntu-latest