[github-actions] use concurrency feature to cancel oustanding jobs (#8154)

This commit is contained in:
Jonathan Hui
2022-09-15 12:06:45 -07:00
committed by GitHub
parent b11121b7b5
commit b5ea9c8106
13 changed files with 54 additions and 96 deletions
+4 -8
View File
@@ -30,15 +30,11 @@ name: Build
on: [push, pull_request] on: [push, pull_request]
jobs: concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs: jobs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
pretty: pretty:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: Docker
on: [push, pull_request] on: [push, pull_request]
jobs: concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs: jobs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
buildx: buildx:
name: buildx-${{ matrix.docker_name }} name: buildx-${{ matrix.docker_name }}
+6
View File
@@ -27,7 +27,13 @@
# #
name: CIFuzz name: CIFuzz
on: [pull_request] on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
jobs: jobs:
Fuzzing: Fuzzing:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: Makefile Check
on: [push, pull_request] on: [push, pull_request]
jobs: concurrency:
cancel-previous-runs: group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
runs-on: ubuntu-20.04 cancel-in-progress: true
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
jobs:
makefile-check: makefile-check:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
+4 -8
View File
@@ -30,15 +30,11 @@ name: Border Router
on: [push, pull_request] on: [push, pull_request]
jobs: concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs: jobs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
backbone-router: backbone-router:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: OTCI
on: [push, pull_request] on: [push, pull_request]
jobs: concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs: jobs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
cli-sim: cli-sim:
name: cli-sim VIRTUAL_TIME=${{ matrix.virtual_time }} name: cli-sim VIRTUAL_TIME=${{ matrix.virtual_time }}
+4 -8
View File
@@ -30,6 +30,10 @@ name: OTNS
on: [push, pull_request] on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
env: env:
COVERAGE: 1 COVERAGE: 1
REFERENCE_DEVICE: 1 REFERENCE_DEVICE: 1
@@ -40,14 +44,6 @@ env:
jobs: jobs:
cancel-previous-runs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
unittests: unittests:
name: Unittests name: Unittests
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: POSIX
on: [push, pull_request] on: [push, pull_request]
jobs: concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs: jobs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
expects-linux: expects-linux:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: Simulation 1.1
on: [push, pull_request] on: [push, pull_request]
jobs: concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs: jobs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
distcheck: distcheck:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: Simulation 1.3
on: [push, pull_request] on: [push, pull_request]
jobs: concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs: jobs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
thread-1-3: thread-1-3:
name: thread-1-3-${{ matrix.compiler.c }}-${{ matrix.arch }} name: thread-1-3-${{ matrix.compiler.c }}-${{ matrix.arch }}
+4 -8
View File
@@ -30,15 +30,11 @@ name: Size
on: [push, pull_request] on: [push, pull_request]
jobs: concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs: jobs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
size-report: size-report:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
+4 -8
View File
@@ -30,15 +30,11 @@ name: Toranj
on: [push, pull_request] on: [push, pull_request]
jobs: concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
cancel-in-progress: true
cancel-previous-runs: jobs:
runs-on: ubuntu-20.04
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
toranj-ncp: toranj-ncp:
name: toranj-ncp-${{ matrix.TORANJ_RADIO }} name: toranj-ncp-${{ matrix.TORANJ_RADIO }}
+4 -8
View File
@@ -30,15 +30,11 @@ name: API Version
on: [pull_request] on: [pull_request]
jobs: concurrency:
cancel-previous-runs: group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
runs-on: ubuntu-20.04 cancel-in-progress: true
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/main'"
jobs:
api-version: api-version:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps: