Skip to content

use mise for easier local link checking #2027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
14 changes: 14 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -189,5 +189,19 @@
depNameTemplate: 'java',
extractVersionTemplate: '^(?<version>\\d+)',
},
{
customType: "regex",
description: "update mise",
managerFilePatterns: [
"/(^|/)(workflow-templates|\\.(?:github|gitea|forgejo)/(?:workflows|actions))/.+\\.ya?ml$/",
"/(^|/)action\\.ya?ml$/"
],
datasourceTemplate: "github-release-attachments",
packageNameTemplate: "jdx/mise",
depNameTemplate: "mise",
matchStrings: [
"jdx/mise-action.*\\n\\s*with:\\s*\\n\\s*version: [\"']?(?<currentValue>v[.\\d]+)[\"']?\\s*\\n\\s*sha256: [\"']?(?<currentDigest>\\w+)[\"']?"
],
}
],
}
3 changes: 0 additions & 3 deletions .github/scripts/dependencies.Dockerfile

This file was deleted.

62 changes: 0 additions & 62 deletions .github/scripts/link-check.sh

This file was deleted.

11 changes: 7 additions & 4 deletions .github/workflows/reusable-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # needed for merge-base below

- uses: jdx/mise-action@bfb9fa0b029db830a8c570757cee683df207a6c5 # v2.4.0
with:
version: v2025.7.11
sha256: fe2d4c5c681c942b2f52bf0c71d04429ba4a5e090973514bde466a411190cd00
- name: Link check - relative links (all files)
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ github.token }}
run: ./.github/scripts/link-check.sh --local-links-only
run: mise run lint-local-links

- name: Get modified files
if: github.event_name == 'pull_request'
Expand All @@ -36,10 +39,10 @@ jobs:
if: github.event_name == 'pull_request' && steps.modified-files.outputs.files != ''
env:
GITHUB_TOKEN: ${{ github.token }}
run: ./.github/scripts/link-check.sh ${{ steps.modified-files.outputs.files }}
run: mise run lint-links ${{ steps.modified-files.outputs.files }}

- name: Link check - all links (all files)
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ github.token }}
run: ./.github/scripts/link-check.sh
run: mise run lint-links
11 changes: 11 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[tools]
lychee = "0.18.1"

[tasks.lint-local-links]
run = 'lychee --verbose --scheme file --include-fragments {{arg(name="files", default=".")}}'

[tasks.lint-links]
run = 'lychee --verbose --config .github/scripts/lychee-config.toml {{arg(name="files", default=".")}}'

[settings]
idiomatic_version_file_enable_tools = []
Loading