summaryrefslogtreecommitdiff
path: root/.github/workflows/linkcheck.yml
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2022-09-17 23:45:32 +0200
committerMarc Hoersken <info@marc-hoersken.de>2022-09-19 21:21:04 +0200
commit4e6893307b0f0d8723c8136748ef76040e3a1991 (patch)
treec6526805f8f0785eac322eabeb55a2edb8cac529 /.github/workflows/linkcheck.yml
parentfda897f5a17adda3250e069bfb43b2392bd8c7e8 (diff)
downloadcurl-4e6893307b0f0d8723c8136748ef76040e3a1991.tar.gz
CI/GHA: cancel outdated CI runs on new PR changes
Avoid letting outdated CI runs continue if a PR receives new changes. Outside a PR we let them continue running by tying the concurrency to the commit hash instead. Also only let one CodeQL or Hacktoberfest job run at a time. Other CI platforms we use have this build in, but GitHub unfortunately neither by default nor with a simple option. This saves CI resources and therefore a little energy. Approved-by: Daniel Stenberg Approved-by: Max Dymond Closes #9533
Diffstat (limited to '.github/workflows/linkcheck.yml')
-rw-r--r--.github/workflows/linkcheck.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml
index 4517ef7c0..9ee7f04e1 100644
--- a/.github/workflows/linkcheck.yml
+++ b/.github/workflows/linkcheck.yml
@@ -19,6 +19,10 @@ on:
- '.github/workflows/linkcheck.yml'
- '**.md'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: true
+
jobs:
# Docs: https://github.com/marketplace/actions/markdown-link-check
check: