Skip to content

Commit bd55385

Browse files
authored
Fix daily link checking (#2339)
1 parent ac7d80d commit bd55385

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/build-daily.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ jobs:
1616
no-build-cache: true
1717

1818
link-check:
19-
uses: ./.github/workflows/reusable-link-check.yml
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
22+
23+
- uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1
24+
25+
- run: mise run lint:links
26+
env:
27+
GITHUB_TOKEN: ${{ github.token }}
2028

2129
workflow-notification:
2230
permissions:

.github/workflows/reusable-link-check.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ jobs:
1717
- uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1
1818

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

2524
- name: Link check (modified files only)
2625
env:
2726
GITHUB_TOKEN: ${{ github.token }}
28-
run: mise run lint:links-in-modified-files --base origin/${{ github.base_ref }} --head ${{ github.event.pull_request.head.sha }} --event ${{ github.event_name }}
27+
run: mise run lint:links-in-modified-files --base origin/${{ github.base_ref }} --head ${{ github.event.pull_request.head.sha }}

.mise/tasks/lint/links-in-modified-files.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ set -e
55

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

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

0 commit comments

Comments
 (0)