瀏覽代碼

Validate all links every day at 00:00 (#1414)

Co-authored-by: Yann Bertrand <5855339+yannbertrand@users.noreply.github.com>
pull/1415/head
Sitram 4 年之前
committed by GitHub
父節點
當前提交
46685f9a2a
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 2 個檔案被更改,包括 21 行新增1 行删除
  1. +19
    -0
      .github/workflows/validate_links.yml
  2. +2
    -1
      build/validate_links.py

+ 19
- 0
.github/workflows/validate_links.yml 查看文件

@@ -0,0 +1,19 @@
name: "Validate links"

on:
schedule:
- cron: '0 0 * * *'

env:
FORMAT_FILE: README.md

jobs:
test:
name: 'Validate README.md'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Validate all links from README.md
run: build/validate_links.sh ${FORMAT_FILE}

+ 2
- 1
build/validate_links.py 查看文件

@@ -33,9 +33,10 @@ def validate_links(links):
errors.append("TMO: " + link)
except socket.error as socketerror:
errors.append("SOC: {} : {}".format(socketerror, link))
except Exception as e:
errors.append("ERR: {} : {}".format(e, link))
return errors


if __name__ == "__main__":
num_args = len(sys.argv)
if num_args < 2:


Loading…
取消
儲存