xref: /curl/.github/workflows/linkcheck.yml (revision 7398037a)
1# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
2#
3# SPDX-License-Identifier: curl
4
5name: Markdown links
6
7on:
8  push:
9    branches:
10      - master
11      - '*/ci'
12    paths:
13      - '.github/workflows/linkcheck.yml'
14      - '**.md'
15  pull_request:
16    branches:
17      - master
18    paths:
19      - '.github/workflows/linkcheck.yml'
20      - '**.md'
21
22concurrency:
23  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
24  cancel-in-progress: true
25
26permissions: {}
27
28jobs:
29  # Docs: https://github.com/marketplace/actions/markdown-link-check
30  check:
31    runs-on: ubuntu-latest
32    steps:
33      - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
34        name: checkout
35
36      - name: trim the cmdline docs markdown files
37        run: find docs/cmdline-opts -name "*.md" ! -name "_*" ! -name MANPAGE.md | xargs -n1 ./.github/scripts/cleancmd.pl
38
39      - uses: gaurav-nelson/github-action-markdown-link-check@5c5dfc0ac2e225883c0e5f03a85311ec2830d368 # v1
40        with:
41          use-quiet-mode: 'yes'
42