Skip to content
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
10 changes: 9 additions & 1 deletion .github/workflows/build-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ jobs:
no-build-cache: true

link-check:
uses: ./.github/workflows/reusable-link-check.yml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1

- run: mise run lint:links
env:
GITHUB_TOKEN: ${{ github.token }}

workflow-notification:
permissions:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/reusable-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ jobs:
- uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1

- name: Link check - relative links (all files)
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ github.token }}
run: mise run lint:local-links

- name: Link check (modified files only)
env:
GITHUB_TOKEN: ${{ github.token }}
run: mise run lint:links-in-modified-files --base origin/${{ github.base_ref }} --head ${{ github.event.pull_request.head.sha }} --event ${{ github.event_name }}
run: mise run lint:links-in-modified-files --base origin/${{ github.base_ref }} --head ${{ github.event.pull_request.head.sha }}
4 changes: 0 additions & 4 deletions .mise/tasks/lint/links-in-modified-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set -e

#USAGE flag "--base <base>" help="base branch to compare against (default: origin/main)" default="origin/main"
#USAGE flag "--head <head>" help="head branch to compare against (empty for local changes) (default: empty)" default=""
#USAGE flag "--event <event>" help="event name (default: pull_request)" default="pull_request"

if [ "$usage_head" = "''" ]; then
usage_head=""
Expand All @@ -20,9 +19,6 @@ config_modified=$(git diff --name-only --merge-base "$usage_base" $usage_head \
if [ -n "$config_modified" ] ; then
echo "config changes, checking all files."
mise run lint:links
elif [ "$usage_event" != "pull_request" ] ; then
echo "Not a PR - skipping link linting."
exit 0
else
# Using lychee's default extension filter here to match when it runs against all files
# Note: --diff-filter=d filters out deleted files
Expand Down