Skip to content

[新] 如何怎样 > GitHub > Rulesets > 如何在分支保护规则集中要求 PR 必须通过自己的 CI/工作流 (#111) #520

[新] 如何怎样 > GitHub > Rulesets > 如何在分支保护规则集中要求 PR 必须通过自己的 CI/工作流 (#111)

[新] 如何怎样 > GitHub > Rulesets > 如何在分支保护规则集中要求 PR 必须通过自己的 CI/工作流 (#111) #520

name: 检查链接有效性
on:
schedule: # 夜间执行
- cron: '0 0 * * *'
workflow_dispatch: # 手动执行
pull_request: # PR执行
push: # Push到main执行
branches:
- main
jobs:
check-url:
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/[email protected]
- name: 设置 Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: 安装依赖
run: |
python -m pip install --upgrade pip
pip install -r .action_scripts/Python/requirements.txt
- name: 检查链接有效性
run: python ./.action_scripts/Python/link_checker.py