]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA: make links get checked daily
authorDaniel Stenberg <daniel@haxx.se>
Tue, 9 Dec 2025 13:39:16 +0000 (14:39 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 9 Dec 2025 15:28:23 +0000 (16:28 +0100)
Assisted-by: Viktor Szakats
Closes #19898

.github/workflows/checkdocs.yml
.github/workflows/checkurls.yml [new file with mode: 0644]
scripts/mdlinkcheck

index a079aeaa70621e4ec6c9268c81fe7e5352c66014..7962034e9673be8222424c956569530f73a24058 100644 (file)
@@ -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 (file)
index 0000000..f407859
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, 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
index bce3ca3fd56cfe5607407dbaf3e0402126e3f367..c28f7dd1ed1afefa2659815b0d4670b7630c14ad 100755 (executable)
@@ -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) = @_;