From 9862ba90fd10c53bdfcc689bc300d648949b19f2 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Sun, 4 Feb 2024 20:08:25 -0800 Subject: [PATCH] chore: cancel previous GHA from the same PR --- .github/workflows/default.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/default.yaml b/.github/workflows/default.yaml index f920c2c..2da29f0 100644 --- a/.github/workflows/default.yaml +++ b/.github/workflows/default.yaml @@ -10,6 +10,11 @@ on: # Allows manually triggering this workflow from the Actions tab. workflow_dispatch: +concurrency: + # Cancel previous actions from the same PR: https://stackoverflow.com/a/72408109 + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: distros: strategy: @@ -19,7 +24,7 @@ jobs: - ubuntu-22.04 runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: bazelbuild/setup-bazelisk@v2 - name: Test run: | @@ -36,7 +41,7 @@ jobs: - opt runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: bazelbuild/setup-bazelisk@v2 - name: Test run: | @@ -54,7 +59,7 @@ jobs: - ubsan runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: bazelbuild/setup-bazelisk@v2 - name: Test ${{ matrix.sanitizer }} run: | @@ -65,7 +70,7 @@ jobs: coverage: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: bazelbuild/setup-bazelisk@v2 - name: Test Coverage run: | @@ -82,7 +87,7 @@ jobs: - macos-11 runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: bazelbuild/setup-bazelisk@v2 - name: Test with RBE run: |