aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/dokka-examples.yml
diff options
context:
space:
mode:
authoraSemy <897017+aSemy@users.noreply.github.com>2023-01-30 22:18:43 +0100
committerGitHub <noreply@github.com>2023-01-30 22:18:43 +0100
commit6ddd978e44134febffc857e9cd871982b4c6d36b (patch)
tree1d03ae0efbdf1fc586c84ad6df05d882b2895e11 /.github/workflows/dokka-examples.yml
parent765fb6e0d94564cf7d8a72d787588d59bd749c6f (diff)
downloaddokka-6ddd978e44134febffc857e9cd871982b4c6d36b.tar.gz
dokka-6ddd978e44134febffc857e9cd871982b4c6d36b.tar.bz2
dokka-6ddd978e44134febffc857e9cd871982b4c6d36b.zip
Add concurrency cancellation for test/build GitHub Actions (#2710)
The GitHub Actions build queue can get 'stacked up' if there are a few smaller commits in quick succession. Since the actions take some time, some small commits can cause the GHA build queue to get congested. This adds a 'concurrency' check for GitHub actions. It means that if a newer trigger comes in (for example, if you make two commits in a row on a PR), then the first job will be cancelled, allowing for the new job to run. This helps save energy, and for faster feedback in PRs. Reference docs: https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
Diffstat (limited to '.github/workflows/dokka-examples.yml')
-rw-r--r--.github/workflows/dokka-examples.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/.github/workflows/dokka-examples.yml b/.github/workflows/dokka-examples.yml
index f1167771..e8782c1c 100644
--- a/.github/workflows/dokka-examples.yml
+++ b/.github/workflows/dokka-examples.yml
@@ -2,6 +2,10 @@ name: Build examples
on: pull_request
+concurrency:
+ group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
+ cancel-in-progress: true
+
jobs:
build:
strategy: