From 564f34f4a4a22ec6c8ee9b420703b80c5101b3b4 Mon Sep 17 00:00:00 2001 From: Vitor Carvalho Date: Wed, 14 Oct 2026 16:06:29 +0100 Subject: [PATCH] OneDev checks: cache the mise tools (GitHub API rate limit) mise downloads every tool from GitHub releases on each run; anonymous API calls are limited to 60/hour per IP and the checks job hit that limit. Cache MISE_DATA_DIR with SetupCacheStep, keyed on the .mise.toml checksum: tools are downloaded only when a version changes. Checkout moves to src/ so gitleaks does not scan the cache. Co-Authored-By: Claude Opus 5.5 --- .onedev-buildspec.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.onedev-buildspec.yml b/.onedev-buildspec.yml index 765adbf..a2c7ab1 100644 --- a/.onedev-buildspec.yml +++ b/.onedev-buildspec.yml @@ -9,6 +9,16 @@ jobs: type: DefaultCredential withLfs: false withSubmodules: false + checkoutPath: src + condition: SUCCESSFUL + optional: false + - type: SetupCacheStep + name: mise tools cache + key: mise-tools + checksumFiles: src/.mise.toml + entries: + - path: mise + uploadStrategy: UPLOAD_IF_NOT_EXACT_MATCH condition: SUCCESSFUL optional: false - type: CommandStep @@ -22,6 +32,10 @@ jobs: set -eu apk add --no-cache -q bash git jq python3 curl mise git config --global --add safe.directory '*' + # Tools in ./mise (cached by the step above, keyed on .mise.toml): + # downloads only when a version changes (GitHub API rate limit). + export MISE_DATA_DIR="$PWD/mise" + cd src mise trust -q .mise.toml mise install -q mise exec -- just lint