Skip to content

Commit 0a78002

Browse files
zeitlingertrask
andauthored
use mise for easier local link checking (#2027)
Co-authored-by: Trask Stalnaker <[email protected]>
1 parent d96a030 commit 0a78002

File tree

4 files changed

+16
-68
lines changed

4 files changed

+16
-68
lines changed

.github/scripts/dependencies.Dockerfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/scripts/link-check.sh

Lines changed: 0 additions & 62 deletions
This file was deleted.

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ jobs:
1414
with:
1515
fetch-depth: 0 # needed for merge-base below
1616

17+
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
18+
1719
- name: Link check - relative links (all files)
1820
if: github.event_name == 'pull_request'
1921
env:
2022
GITHUB_TOKEN: ${{ github.token }}
21-
run: ./.github/scripts/link-check.sh --local-links-only
23+
run: mise run lint-local-links
2224

2325
- name: Get modified files
2426
if: github.event_name == 'pull_request'
@@ -50,10 +52,10 @@ jobs:
5052
if: github.event_name == 'pull_request' && steps.modified-files.outputs.files != ''
5153
env:
5254
GITHUB_TOKEN: ${{ github.token }}
53-
run: ./.github/scripts/link-check.sh ${{ steps.modified-files.outputs.files }}
55+
run: mise run lint-links ${{ steps.modified-files.outputs.files }}
5456

5557
- name: Link check - all links (all files)
5658
if: github.event_name != 'pull_request' || steps.config-check.outputs.modified == 'true'
5759
env:
5860
GITHUB_TOKEN: ${{ github.token }}
59-
run: ./.github/scripts/link-check.sh
61+
run: mise run lint-links

mise.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[tools]
2+
lychee = "0.18.1"
3+
4+
[tasks.lint-local-links]
5+
run = 'lychee --verbose --scheme file --include-fragments {{arg(name="files", default=".")}}'
6+
7+
[tasks.lint-links]
8+
run = 'lychee --verbose --config .github/scripts/lychee-config.toml {{arg(name="files", default=".")}}'
9+
10+
[settings]
11+
idiomatic_version_file_enable_tools = []

0 commit comments

Comments
 (0)