Skip to content

Added Pipeline for scheduled link rot checker #3649

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/links.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a whitespace after # in comments. E.g., should be:

# v4.2.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Automated Link Health Check
on:
workflow_dispatch:
schedule:
- cron: "00 18 * * *" # Runs the cron at 1800 hrs UTC Everyday
jobs:
linkChecker:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1
with:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to add these args (inspired https://github.com/open-policy-agent/opa/blob/f72110de200666efeed73887707f8207a767ec9a/.github/workflows/link-checker.yaml):

Suggested change
with:
with:
args: |
--max-concurrency 1 \
--no-progress \
--scheme https \
--scheme http

fail: false
output: ./lychee/out.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose adding this step to output results to a log:

Suggested change
output: ./lychee/out.md
output: ./lychee/out.md
- name: Show Report
run: cat lychee/out.md

- name: Create Issue From File
if: steps.lychee.outputs.exit_code != 0
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: report, automated issue
Loading