Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPankraz committed Apr 26, 2024
2 parents 34d9d9b + 2a0456f commit ecbe68d
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/links-watcher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

name: Periodic Link Checker

on:
schedule:
- cron: "0 23 * * *"
workflow_dispatch:

permissions:
contents: read
issues: write

jobs:
link-checker:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code"
uses: actions/checkout@v4
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.9.3
with:
args: --verbose --no-progress --max-concurrency 2 --exclude-link-local --exclude-loopback './**/*.md' --exclude portal.azure.com --exclude developers.sap.com
output: ./lychee/out.md
fail: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Find existing issue
id: find_issue
uses: micalevisk/last-issue-action@v2
if: failure()
with:
state: open
labels: |
broken link
automated issue
- name: Create or update issue for broken links
uses: peter-evans/create-issue-from-file@v5
if: failure()
with:
title: Link Checker Report
# If issue number is empty a new issue gets created
issue-number: ${{ steps.find_issue.outputs.issue-number }}
content-filepath: ./lychee/out.md
labels: broken link, automated issue

0 comments on commit ecbe68d

Please sign in to comment.