Skip to content

[chore] Improve queue config validation messages #25573

[chore] Improve queue config validation messages

[chore] Improve queue config validation messages #25573

Workflow file for this run

name: check-links
on:
push:
branches: [main]
pull_request:
merge_group:
types: [checks_requested]
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
permissions: read-all
env:
# renovate: datasource=github-releases depName=tcort/markdown-link-check
MD_LINK_CHECK_VERSION: "3.12.2"
jobs:
changedfiles:
name: changed files
runs-on: ubuntu-latest
env:
PR_HEAD: ${{ github.event.pull_request.head.sha }}
outputs:
files: ${{ steps.changes.outputs.files }}
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Get changed files
id: changes
run: |
files=$(git diff --name-only --diff-filter=ACMRTUXB $(git merge-base origin/main $PR_HEAD) $PR_HEAD | grep .md$ | xargs)
if [ -z "$files" ] && git diff --name-only $(git merge-base origin/main $PR_HEAD) $PR_HEAD | grep -q "package.json"; then
files="**/*.md"
fi
echo "files=$files" >> $GITHUB_OUTPUT
check-links:
runs-on: ubuntu-latest
needs: changedfiles
if: ${{needs.changedfiles.outputs.files}}
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Install markdown-link-check
run: npm install -g markdown-link-check@${{ env.MD_LINK_CHECK_VERSION }}
- name: Run markdown-link-check
run: |
npx --no -- markdown-link-check \
--verbose \
--config .github/workflows/check_links_config.json \
${{needs.changedfiles.outputs.files}} \
|| { echo "Check that anchor links are lowercase"; exit 1; }