Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: check for link rot in static resources #5744

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
33 changes: 33 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Link rot
on:
- push

jobs:
check:
name: Link rot check
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Get files that need to be checked
id: get_files
run: |
html_files=$(find html/donate -type f -name '*.html' -exec basename {} \;)
html_files=$(echo "$html_files" | xargs | sed -e 's/ /,/g')
file_list="CONTRIBUTING.md,README.md,${html_files[@]}"
echo "::set-output name=all_files::$file_list"
echo $file_list

- name: Check URLs
uses: paramt/url-checker@master
with:
files: "${{ steps.get_files.outputs.all_files }}"

- uses: LouisBrunner/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Check
status: completed
conclusion: ${{ steps.check.outputs.conclusion }}
output: ${{ steps.check.outputs.output }}
Loading