-
Notifications
You must be signed in to change notification settings - Fork 55
48 lines (39 loc) · 1.44 KB
/
Check_broken_link.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
#--------------------------------------------------------------------
# This action/workflow checks for broken link on every first of the month
# and creates an issue for the same if found any.
# It can also be manually run form Github acion center of the repository.
# It uses markdown template to create the issue located here
# .github/ISSUE_TEMPLATE/check-broken-links.md
#
# Sources Used
# https://crontab.guru/#0_1_1_*_*
# https://github.com/marketplace/actions/link-snitch
# https://github.com/marketplace/actions/create-an-issue
#----------------------------------------------------------------------
name: Check Broken Links
on:
schedule:
- cron: '0 1 1 * *'
workflow_dispatch:
env:
URL: https://open-horizon.github.io/
ISSUE_TEMPLATE: ".github/ISSUE_TEMPLATE/check-broken-links.md"
CONFIG: ".github/broken-link-gha-config.json"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out master
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Run check for Broken Link
uses: victoriadrake/link-snitch@master
- name: Creating issue
uses: JasonEtco/create-an-issue@v2.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LOG_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}?check_suite_focus=true
with:
filename: ${{ env.ISSUE_TEMPLATE }}
if: failure()