curl/.github/workflows/linkcheck.yml
Marc Hoersken 4e6893307b
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
2022-09-19 21:21:04 +02:00

35 lines
739 B
YAML

# Copyright (C) 2000 - 2022 Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
name: Markdown links
on:
push:
branches:
- master
- '*/ci'
paths:
- '.github/workflows/linkcheck.yml'
- '**.md'
pull_request:
branches:
- master
paths:
- '.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:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'