-
Notifications
You must be signed in to change notification settings - Fork 42
60 lines (58 loc) · 2.21 KB
/
check-links.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: periodic-broken-link-checks
on:
workflow_call:
workflow_dispatch:
push:
paths:
- .github/workflows/check-links.yml
jobs:
broken-link-checker:
runs-on: ubuntu-latest
steps:
- name: Checkout Workspace
uses: actions/checkout@v3
- name: Crawl for Broken Links
run: ./check-links/crawl-for-broken-links.sh https://openziti.io
- name: Resolve Alarm Issue if Links are Not Broken
if: ${{ success() }}
uses: netfoundry/close-matching-issues@v3
with:
query: 'is:open label:bug in:title "Broken Links Alarm"'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Raise an Alarm Issue if Links are Broken
if: ${{ failure() }}
uses: JasonEtco/[email protected]
with:
update_existing: true
search_existing: open
filename: ./check-links/check-links-issue-template.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
popular-link-checker:
runs-on: ubuntu-latest
steps:
- name: Checkout Workspace
uses: actions/checkout@v3
- name: Check popular links to new docs site
run: ./check-links.sh https://openziti.io ./popular-docs-links.txt
working-directory: ./check-links/
- name: Check popular links to old docs site
run: ./check-links.sh https://docs.openziti.io ./popular-docs-links.txt
working-directory: ./check-links/
- name: Resolve Alarm Issue if Links are Not Broken
if: ${{ success() }}
uses: netfoundry/close-matching-issues@v3
with:
query: 'is:open label:bug in:title "Popular Links Alarm"'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Raise an Alarm Issue if Links are Broken
if: ${{ failure() }}
uses: JasonEtco/[email protected]
with:
update_existing: true
search_existing: open
filename: ./check-links/popular-links-issue-template.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}