From 469ffa64ffdc280e65b06f995f222b50649b5ca1 Mon Sep 17 00:00:00 2001 From: Glenn Jackman Date: Fri, 2 Oct 2026 08:17:13 -0400 Subject: [PATCH 1/3] add link checker --- .github/workflows/link-checker.yml | 30 ++++++++++++++++++++++++++++++ README.md | 26 ++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/link-checker.yml diff --git a/.github/workflows/link-checker.yml b/.github/workflows/link-checker.yml new file mode 100644 index 0000000..99258ae --- /dev/null +++ b/.github/workflows/link-checker.yml @@ -0,0 +1,30 @@ +name: Configlet Auto Sync + +on: + workflow_call: + +jobs: + linkChecker: + if: github.repository_owner == 'exercism' + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 + with: + args: --cache --accept ..=299,429 --suggest --verbose --require-https --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36" --no-progress **/*.md **/*.html **/*.toml **/*.json + fail: false + + - name: Create Issue From File + if: steps.lychee.outputs.exit_code != 0 + uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0 + with: + title: Link Checker Report + content-filepath: ./lychee/out.md + labels: report, automated issue + \ No newline at end of file diff --git a/README.md b/README.md index 815a195..c2dbea6 100644 --- a/README.md +++ b/README.md @@ -343,5 +343,31 @@ jobs: ordering: ".bucket, .slug" ``` +## Reusable workflow: link-checker + +The `link-checker` reusable workflow calls [Lychee][lychee] and creates an issue if any problematic links are reported. + +### Inputs + +None. + +### Example + +To run this on a monthly schedule, in your track repo add this workflow: + +```yaml +name: Check Links + +on: + workflow_dispatch: + schedule: + - cron: 0 0 15 * * # 15th day of each month + +jobs: + call-gha-workflow: + uses: exercism/github-actions/.github/workflow/link-checker.yml@main +``` + [configlet]: https://exercism.org/docs/building/configlet [configlet-lint]: https://exercism.org/docs/building/configlet/lint +[lychee]: https://github.com/lycheeverse/lychee#readme From f24a690d0b9cc3e0ec280b53a3d99400bdf7537c Mon Sep 17 00:00:00 2001 From: Glenn Jackman Date: Fri, 2 Oct 2026 10:04:45 -0400 Subject: [PATCH 2/3] pin the runs-on image --- .github/workflows/link-checker.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/link-checker.yml b/.github/workflows/link-checker.yml index 99258ae..593b886 100644 --- a/.github/workflows/link-checker.yml +++ b/.github/workflows/link-checker.yml @@ -6,7 +6,7 @@ on: jobs: linkChecker: if: github.repository_owner == 'exercism' - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 permissions: issues: write steps: @@ -27,4 +27,3 @@ jobs: title: Link Checker Report content-filepath: ./lychee/out.md labels: report, automated issue - \ No newline at end of file From bc1eb2ad639db7837052798756ae44967e4de370 Mon Sep 17 00:00:00 2001 From: Glenn Jackman Date: Fri, 2 Oct 2026 11:56:19 -0400 Subject: [PATCH 3/3] Give workflow the right name --- .github/workflows/link-checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-checker.yml b/.github/workflows/link-checker.yml index 593b886..e9ed796 100644 --- a/.github/workflows/link-checker.yml +++ b/.github/workflows/link-checker.yml @@ -1,4 +1,4 @@ -name: Configlet Auto Sync +name: Check Links on: workflow_call: