From: Daniel Stenberg Date: Tue, 9 Dec 2025 13:39:16 +0000 (+0100) Subject: GHA: make links get checked daily X-Git-Tag: rc-8_18_0-2~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=073b85cefe30e27316c6bcbb382b746e9a412e73;p=thirdparty%2Fcurl.git GHA: make links get checked daily Assisted-by: Viktor Szakats Closes #19898 --- diff --git a/.github/workflows/checkdocs.yml b/.github/workflows/checkdocs.yml index a079aeaa70..7962034e96 100644 --- a/.github/workflows/checkdocs.yml +++ b/.github/workflows/checkdocs.yml @@ -89,17 +89,6 @@ jobs: # - name: 'check special prose' # run: proselint docs/internals/CHECKSRC.md docs/libcurl/curl_mprintf.md docs/libcurl/opts/CURLOPT_INTERFACE.md docs/cmdline-opts/interface.md - linkcheck: - name: 'linkcheck' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - persist-credentials: false - - - name: 'mdlinkcheck' - run: ./scripts/mdlinkcheck - pyspelling: name: 'pyspelling' runs-on: ubuntu-latest diff --git a/.github/workflows/checkurls.yml b/.github/workflows/checkurls.yml new file mode 100644 index 0000000000..f407859c75 --- /dev/null +++ b/.github/workflows/checkurls.yml @@ -0,0 +1,28 @@ +# Copyright (C) Daniel Stenberg, , et al. +# +# SPDX-License-Identifier: curl + +name: 'URLs' + +'on': + schedule: + - cron: '10 5 * * *' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +permissions: {} + +jobs: + linkcheck: + if: ${{ github.repository_owner == 'curl' }} + name: 'linkcheck' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + with: + persist-credentials: false + + - name: 'mdlinkcheck' + run: ./scripts/mdlinkcheck diff --git a/scripts/mdlinkcheck b/scripts/mdlinkcheck index bce3ca3fd5..c28f7dd1ed 100755 --- a/scripts/mdlinkcheck +++ b/scripts/mdlinkcheck @@ -86,8 +86,8 @@ my %whitelist = ( my %url; my %flink; -# list all .md files in the repo -my @files=`git ls-files '**.md'`; +# list all files to scan for links +my @files=`git ls-files docs src lib scripts`; sub storelink { my ($f, $line, $link) = @_;