Skip to content

Commit

Permalink
Add link aliveness tests
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
  • Loading branch information
dfarrell07 authored and tpantelis committed Aug 20, 2020
1 parent eccc8dd commit 6decf29
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/broken-link.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Broken link detected by CI
labels: bug
---

<!-- Used by automation to raise an Issue when the periodic link aliveness tests detect a broken link. -->

Periodic link aliveness CI detected a broken link. Please see the job results for details.
25 changes: 25 additions & 0 deletions .github/workflows/md-links-periodic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Markdown Link Checks
on:
schedule:
- cron: "0 0 * * 0"

jobs:
markdown-link-check-periodic:
runs-on: ubuntu-latest
name: Markdown Link Checks
steps:
- name: Check out code
uses: actions/checkout@v1

- name: Run markdown-link-check
uses: gaurav-nelson/github-action-markdown-link-check@0.6.0
with:
config-file: ".markdownlinkcheck.json"

- name: Raise an Issue to report broken links
if: ${{ failure() }}
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/ISSUE_TEMPLATE/broken-link.md
16 changes: 16 additions & 0 deletions .github/workflows/md-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Markdown Link Checks
on: pull_request

jobs:
markdown-link-check:
runs-on: ubuntu-latest
name: Markdown Link Checks
steps:
- name: Check out code
uses: actions/checkout@v1

- name: Run markdown-link-check
uses: gaurav-nelson/github-action-markdown-link-check@0.6.0
with:
config-file: ".markdownlinkcheck.json"
check-modified-files-only: "yes"
10 changes: 10 additions & 0 deletions .markdownlinkcheck.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignorePatterns": [
{
"pattern": "^https://github.com/\\S+/\\S+/(issues|pull)/[0-9]+"
},
{
"pattern": "^http://localhost:"
}
]
}

0 comments on commit 6decf29

Please sign in to comment.