-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Peppi-Lotta <[email protected]>
- Loading branch information
1 parent
c742269
commit 1deb959
Showing
2 changed files
with
32 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,39 @@ | ||
name: Check Links | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
- cron: "0 0 * * 0" | ||
repository_dispatch: # run manually | ||
types: [check-link] | ||
|
||
permissions: {} | ||
|
||
name: Broken Link Check | ||
jobs: | ||
check: | ||
name: Broken Link Check | ||
linkChecker: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
issues: write | ||
|
||
if: github.repository == 'metal3-io/metal3-io.github.io' | ||
steps: | ||
- name: Broken Link Check | ||
uses: technote-space/broken-link-checker-action@b8332d945b97f8b52eb8d7d889a1e0e37106c1a9 # v2.3.2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: read urls from sitemap | ||
id: extractUrls | ||
run: echo "urls=$(curl -sL {insert sitemap.xml url here} | grep -o "<loc>[^<]*" | sed -e 's/<[^>]*>//g' | tr '\n' ' ')" >> $GITHUB_OUTPUT | ||
|
||
- name: Link Checker Metal3.io Web Page | ||
id: lycheemetal3io | ||
uses: lycheeverse/[email protected] | ||
with: | ||
args: --user-agent "curl/8.4.0" ${{ steps.extractUrls.outputs.urls }} | ||
output: /tmp/lychee_output.md | ||
|
||
- name: Create Issue From File Metal3.io | ||
if: steps.lycheemetal3io.outputs.exit_code != 0 | ||
uses: peter-evans/[email protected] | ||
with: | ||
title: Link Checker Report | ||
content-filepath: /tmp/lychee_output.md | ||
labels: | | ||
report | ||
automated issue |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
https://localhost | ||
http://localhost | ||
https://0.0.0.0 | ||
http://0.0.0.0 | ||
https://github.com/issues |