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

link-check:
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 }}
uses: ./.github/workflows/reusable-link-check.yml

workflow-notification:
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- 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 }}
run: mise run lint:links-in-modified-files --base origin/${{ github.base_ref }} --head ${{ github.event.pull_request.head.sha }} --event ${{ github.event_name }}
6 changes: 5 additions & 1 deletion .mise/tasks/lint/links-in-modified-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ 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 @@ -16,7 +17,10 @@ fi
config_modified=$(git diff --name-only --merge-base "$usage_base" $usage_head \
| grep -E '^(\.github/config/lychee\.toml|\.mise/tasks/lint/.*|mise\.toml)$' || true)

if [ -n "$config_modified" ] ; then
if [ "$usage_event" != "pull_request" ] ; then
echo "Not a PR - checking all files."
mise run lint:links
elif [ -n "$config_modified" ] ; then
echo "config changes, checking all files."
mise run lint:links
else
Expand Down