Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link Check just for files in a PR #471

Merged
merged 7 commits into from
Oct 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/link-checker-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This link check is run on all PRs but just for the files that were changed/added in the PR itself.
# Otherwise we had it too often that PR authors would see a failing link check that had nothing to do with their PR.

name: Link Check PR

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v32

- name: Filter markdown files only
run: |
md_files=`find ${{ steps.changed-files.outputs.all_changed_files }} -maxdepth 0 -name "*.md"`
echo "MARKDOWN_FILES=$md_files" >> $GITHUB_ENV

- name: Restore lychee cache
uses: actions/cache@v3
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- if: ${{ env.MARKDOWN_FILES != '' }}
name: Link Checker
uses: lycheeverse/lychee-action@v1.5.0
with:
args: --verbose --no-progress --cache --max-cache-age 1d $MARKDOWN_FILES
fail: true
jobSummary: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
10 changes: 4 additions & 6 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# This link check is run on all content files once per day.

# from: https://github.com/lycheeverse/lychee-action
# link checker used is 'lychee': https://github.com/lycheeverse/lychee

name: Link Check

on:
push:
branches:
- "main"
pull_request:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '30 8 * * *'
- cron: '30 8 * * 5'

jobs:
linkChecker:
Expand All @@ -32,4 +30,4 @@ jobs:
fail: true
jobSummary: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion TRUSTED-COMMITTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ However, please channel working group-specific requests through the trusted comm

## References

* Our trusted committer process was inspired by [this](https://tech.europace.de/voting-in-new-trusted-committers/).
Our trusted committer process was inspired by [this](https://tech.europace.de/voting-in-new-trusted-committers/).