Merge branch 'hn/ci-cancel-stale-pr-runs' into jch
GitHub Actions CI workflow runs triggered by pull requests have been configured to cancel older runs when a new push is made to the same pull request. * hn/ci-cancel-stale-pr-runs: ci: cancel stale pull request workflow runsjch
commit
b80155f7ee
|
|
@ -5,18 +5,20 @@ on: [push, pull_request]
|
||||||
env:
|
env:
|
||||||
DEVELOPER: 1
|
DEVELOPER: 1
|
||||||
|
|
||||||
# If more than one workflow run is triggered for the very same commit hash
|
# For pull requests, only the latest workflow run is allowed to proceed.
|
||||||
# (which happens when multiple branches pointing to the same commit), only
|
# Older runs are canceled when a new revision is pushed.
|
||||||
# the first one is allowed to run, the second will be kept in the "queued"
|
|
||||||
# state. This allows a successful completion of the first run to be reused
|
|
||||||
# in the second run via the `skip-if-redundant` logic in the `config` job.
|
|
||||||
#
|
#
|
||||||
# The only caveat is that if a workflow run is triggered for the same commit
|
# For pushes, if more than one workflow run is triggered for the very same
|
||||||
# hash that another run is already being held, that latter run will be
|
# commit hash (which happens when multiple branches point to the same commit),
|
||||||
# canceled. For more details about the `concurrency` attribute, see:
|
# only the first one is allowed to run. This allows a successful completion of
|
||||||
|
# the first run to be reused in the second run via the `skip-if-redundant`
|
||||||
|
# logic in the `config` job.
|
||||||
|
#
|
||||||
|
# For more details about the `concurrency` attribute, see:
|
||||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
|
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.sha }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci-config:
|
ci-config:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue