Check Broken Links #41
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
#-------------------------------------------------------------------- | |
# 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() |