diff --git a/.github/workflows/build-daily.yml b/.github/workflows/build-daily.yml index 7704cab52..8fe632aec 100644 --- a/.github/workflows/build-daily.yml +++ b/.github/workflows/build-daily.yml @@ -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: diff --git a/.github/workflows/reusable-link-check.yml b/.github/workflows/reusable-link-check.yml index efb8e2874..4c31f58fc 100644 --- a/.github/workflows/reusable-link-check.yml +++ b/.github/workflows/reusable-link-check.yml @@ -17,7 +17,6 @@ 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 @@ -25,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 }} --event ${{ github.event_name }} + run: mise run lint:links-in-modified-files --base origin/${{ github.base_ref }} --head ${{ github.event.pull_request.head.sha }} diff --git a/.mise/tasks/lint/links-in-modified-files.sh b/.mise/tasks/lint/links-in-modified-files.sh index 74667f292..c3b174ad1 100755 --- a/.mise/tasks/lint/links-in-modified-files.sh +++ b/.mise/tasks/lint/links-in-modified-files.sh @@ -5,7 +5,6 @@ set -e #USAGE flag "--base " help="base branch to compare against (default: origin/main)" default="origin/main" #USAGE flag "--head " help="head branch to compare against (empty for local changes) (default: empty)" default="" -#USAGE flag "--event " help="event name (default: pull_request)" default="pull_request" if [ "$usage_head" = "''" ]; then usage_head="" @@ -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