outer link check #410
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: outer link check | |
on: | |
workflow_dispatch: | |
schedule: | |
# UTC 表記 | |
# 日本時間 日曜23:30 | |
- cron: "30 14 * * 0" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
- uses: actions/checkout@v4 | |
with: | |
ref: master | |
- name: check | |
run: | | |
{ python3 .github/workflows/script/link_check.py --check-outer-link 3>&2 2>&1 1>&3 | tee check_result.txt; } 3>&2 2>&1 1>&3 | |
- name: create github issue when needed | |
run: python3 .github/workflows/script/create_github_issue_when_not_empty.py check_result.txt ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ github.sha }} | |
- name: detect link check check_result | |
run: test -f check_result.txt && test $(wc -l < check_result.txt) -eq 0 |