瀏覽代碼

GitHub Actions: Update base image and actions

Hugo Locurcio 3 月之前
父節點
當前提交
c2337a3ef1
共有 2 個文件被更改,包括 37 次插入5 次删除
  1. 5 5
      .github/workflows/check-urls.yml
  2. 32 0
      .lycheeignore

+ 5 - 5
.github/workflows/check-urls.yml

@@ -3,20 +3,20 @@ on:
   push:
   pull_request:
   schedule:
-    # Every day at midnight (UTC).
+    # Every Friday at 15:35 (UTC).
     # URLs can decay over time. Setting up a schedule makes it possible to be warned
     # about dead links as soon as possible.
-    - cron: "0 0 * * *"
+    - cron: "35 15 * * FRI"
 
 jobs:
   check-urls:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     steps:
 
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
 
       - name: Check link validity
-        uses: lycheeverse/lychee-action@v1.5.0
+        uses: lycheeverse/lychee-action@v2.4.0
 
       - name: Fail if there were link errors
         run: exit ${{ steps.lc.outputs.exit_code }}

+ 32 - 0
.lycheeignore

@@ -0,0 +1,32 @@
+# Don't read Godot's own URL schemes as web URLs.
+user:\/\/.*
+res:\/\/.*
+uid:\/\/.*
+
+# Don't read WebSockets or TCP URLs as web URLs.
+ws(s?):\/\/.*
+tcp:\/\/.*
+
+# Security checks prevent checking the URLs of these websites automatically,
+# typically returning 403 errors.
+.*asecuritysite\.com.*
+.*intel\.com.*
+.*reddit\.com.*
+.*inkscape.org.*
+.*computerhope.com*
+
+# Don't check URLs from these websites due to frequent rate limits (error 429) or timeouts.
+.*adobe\.com.*
+.*gamedevartisan\.com.*
+.*github\.com.*
+.*gnu\.org.*
+.*loopit\.dk.*
+.*meta\.com.*
+.*sourceforge\.io.*
+
+# Not a valid URL with the GET method, which lychee always sends.
+# Mentioned in the class reference.
+.*httpbin\.org\/post
+
+# Class reference mentions `example.com/index.php` in an example, which is 404.
+.*example\.com.*