diff --git a/.github/scripts/dependencies.dockerfile b/.github/scripts/dependencies.dockerfile deleted file mode 100644 index d8e3bbfe176b..000000000000 --- a/.github/scripts/dependencies.dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -# this file exists so that Renovate can auto-update docker image versions that are then used elsewhere - -FROM lycheeverse/lychee:sha-2aa22f8@sha256:2e3786630482c41f9f2dd081e06d7da1c36d66996e8cf6573409b8bc418d48c4 AS lychee diff --git a/.github/scripts/link-check.sh b/.github/scripts/link-check.sh deleted file mode 100755 index 788e22830ba4..000000000000 --- a/.github/scripts/link-check.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -set -e - -export MSYS_NO_PATHCONV=1 # for Git Bash on Windows - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -LYCHEE_CONFIG="$SCRIPT_DIR/../../.lychee.toml" -DEPENDENCIES_DOCKERFILE="$SCRIPT_DIR/dependencies.dockerfile" - -# Extract lychee version from dependencies.dockerfile -LYCHEE_VERSION=$(grep "FROM lycheeverse/lychee:" "$DEPENDENCIES_DOCKERFILE" | sed 's/.*FROM lycheeverse\/lychee:\([^ ]*\).*/\1/') - -# Build the lychee command with optional GitHub token -CMD="lycheeverse/lychee:$LYCHEE_VERSION --verbose --config $(basename "$LYCHEE_CONFIG")" - -# Add GitHub token if available -if [[ -n "$GITHUB_TOKEN" ]]; then - CMD="$CMD --github-token $GITHUB_TOKEN" -fi - -# Add the target directory -CMD="$CMD ." - -# Determine if we should allocate a TTY -DOCKER_FLAGS="--rm --init" -if [[ -t 0 ]]; then - DOCKER_FLAGS="$DOCKER_FLAGS -it" -else - DOCKER_FLAGS="$DOCKER_FLAGS -i" -fi - -# Run lychee with proper signal handling -# shellcheck disable=SC2086 -exec docker run $DOCKER_FLAGS -v "$(dirname "$LYCHEE_CONFIG")":/data -w /data $CMD diff --git a/.github/workflows/reusable-link-check.yml b/.github/workflows/reusable-link-check.yml index 044e85e1f9a5..71bf138b5fbf 100644 --- a/.github/workflows/reusable-link-check.yml +++ b/.github/workflows/reusable-link-check.yml @@ -11,8 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - + - uses: jdx/mise-action@5cb1df66ed5e1fb3c670ea0b62fd17a76979826a # v2.3.1 - name: Link check env: GITHUB_TOKEN: ${{ github.token }} - run: ./.github/scripts/link-check.sh + run: mise run lint-links diff --git a/mise.toml b/mise.toml new file mode 100644 index 000000000000..2517ef75046c --- /dev/null +++ b/mise.toml @@ -0,0 +1,8 @@ +[tools] +lychee = "0.18.1" + +[tasks.lint-links] +run = "lychee --verbose --config .lychee.toml ." + +[settings] +idiomatic_version_file_enable_tools = []