mirror of
https://github.com/EbookFoundation/free-programming-books.git
synced 2026-07-08 05:11:57 +00:00
- Removed trailing slash from Patterns.dev to pass remark-lint - Set fail: false in lychee-action to mirror legacy awesome_bot non-blocking behavior
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: Check URLs from changed files
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: '${{ github.workflow }} @ ${{ github.run_id }}'
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
get-changed-files:
|
|
name: Get changed files
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
files: ${{ steps.changed-files.outputs.all_changed_files }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Get changed files
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@v46
|
|
with:
|
|
separator: " "
|
|
files: |
|
|
**/*.md
|
|
**/*.yml
|
|
|
|
check-urls:
|
|
name: Check URLs with Lychee
|
|
needs: get-changed-files
|
|
if: needs.get-changed-files.outputs.files != ''
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Link Checker
|
|
uses: lycheeverse/lychee-action@v2
|
|
with:
|
|
args: --verbose --no-progress --timeout 10 --max-retries 3 --retry-wait-time 2 ${{ needs.get-changed-files.outputs.files }}
|
|
fail: false
|