Skip to content
Merged
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
22 changes: 12 additions & 10 deletions .github/workflows/lychee-pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get changed docs files
id: changed-md-files
run: |
CHANGED_FILES=$(git diff --name-only $GITHUB_SHA^ $GITHUB_SHA -- '*.md' | paste -sd "," -)
echo "Changed Markdown files: '$CHANGED_FILES'"
echo "changed_files=${CHANGED_FILES:-}" >> "$GITHUB_OUTPUT"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Get all changed markdown files
id: changed-markdown-files
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
with:
# Avoid using single or double quotes for multiline patterns
files: |
docs/**/*.md
- name: Run Lychee Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1
if: steps.changed-markdown-files.outputs.any_changed == 'true'
uses: lycheeverse/lychee-action@a99389aeff3c193ffb6f0741178e519569d3f404 # v2.3.0
with:
args: --config lychee.toml ${{ steps.changed-md-files.outputs.changed_files }}
args: --config lychee.toml ${{ steps.changed-markdown-files.outputs.all_changed_files }}
- name: PR comment with file
uses: thollander/actions-comment-pull-request@v3
uses: thollander/actions-comment-pull-request@e4a76dd2b0a3c2027c3fd84147a67c22ee4c90fa # v3.0.1
with:
file-path: lychee/out.md
comment-tag: execution
Expand Down