Skip to content

Commit

Permalink
Merge pull request #61 from microbiomedata/59_githubaction_urlchecker
Browse files Browse the repository at this point in the history
Add github workflow to check that links in repo are good
  • Loading branch information
brynnz22 authored Jul 17, 2024
2 parents 8cad929 + f608c40 commit e1faccb
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing document](CONTRIBUTING.md)?
* [ ] Have you checked to ensure there aren't other open [Pull Requests](../../../pulls) for the same update/change?
* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/microbiomedata/nmdc_notebooks/pulls) for the same update/change?
* [ ] Does your PR link to an issue?
* [ ] Have you described the changes this PR will make?

Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/link_check_chron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will check all the links in the markdown files in the repository every day at 6 PM.

name: Check links on schedule
# https://github.com/lycheeverse/lychee-action

on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "00 18 * * *"

jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1

- name: Create Issue From File
if: env.lychee_exit_code != 0
uses: peter-evans/create-issue-from-file@v4
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: report, automated issue
18 changes: 18 additions & 0 deletions .github/workflows/link_check_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This workflow will check all the links in the markdown files in the repository on each PR or by manual trigger.

name: Check links on pull request
on:
pull_request:
workflow_dispatch:
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Link Checker
# Reference: https://github.com/lycheeverse/lychee-action
id: lychee
uses: lycheeverse/lychee-action@v1
with:
fail: true

0 comments on commit e1faccb

Please sign in to comment.