github/workflows: Cancel when branch is updated.
This adds a concurrency section to all github workflows to cancel any in progress workflow when a branch is updated. This should cancel any ongoing or queued workflows, e.g. when a pull request is updated. Signed-off-by: David Lechner <david@pybricks.com>
This commit is contained in:
parent
3c2d7563d2
commit
5608226cfd
|
@ -2,6 +2,10 @@ name: Check code formatting
|
|||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'ports/bare-arm/**'
|
||||
- 'ports/minimal/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
|
|
|
@ -5,6 +5,10 @@ on:
|
|||
workflows: [Check code size]
|
||||
types: [completed]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
comment:
|
||||
runs-on: ubuntu-20.04
|
||||
|
|
|
@ -2,6 +2,10 @@ name: Check commit message formatting
|
|||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -5,6 +5,10 @@ on:
|
|||
paths:
|
||||
- docs/**
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -10,6 +10,10 @@ on:
|
|||
- 'py/**'
|
||||
- 'shared/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
embedding:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -9,6 +9,10 @@ on:
|
|||
- 'tests/**'
|
||||
- 'tools/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-20.04 # use 20.04 to get python2
|
||||
|
|
|
@ -8,6 +8,10 @@ on:
|
|||
- 'tools/**'
|
||||
- ports/**
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'drivers/**'
|
||||
- 'ports/cc3200/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'drivers/**'
|
||||
- 'ports/esp32/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_idf402:
|
||||
runs-on: ubuntu-20.04
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'drivers/**'
|
||||
- 'ports/esp8266/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'drivers/**'
|
||||
- 'ports/mimxrt/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'drivers/**'
|
||||
- 'ports/nrf/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'drivers/**'
|
||||
- 'ports/powerpc/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -13,6 +13,10 @@ on:
|
|||
- 'ports/qemu-arm/**'
|
||||
- 'tests/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_and_test:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'drivers/**'
|
||||
- 'ports/renesas-ra/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_renesas_ra_board:
|
||||
runs-on: ubuntu-20.04
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'drivers/**'
|
||||
- 'ports/rp2/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'drivers/**'
|
||||
- 'ports/samd/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'drivers/**'
|
||||
- 'ports/stm32/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_pyb:
|
||||
runs-on: ubuntu-20.04
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'drivers/**'
|
||||
- 'ports/teensy/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -14,6 +14,10 @@ on:
|
|||
- 'ports/unix/**'
|
||||
- 'tests/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
minimal:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -11,6 +11,10 @@ on:
|
|||
- 'lib/**'
|
||||
- 'ports/webassembly/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
- 'ports/unix/**'
|
||||
- 'ports/windows/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -11,6 +11,10 @@ on:
|
|||
- 'lib/**'
|
||||
- 'ports/zephyr/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
Loading…
Reference in New Issue