From e6ea178a3238d7dc0cb6da23a3808f544cefc001 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Jun 2026 03:48:52 +0000 Subject: [PATCH] Update actions/cache action to v6 --- .github/workflows/desktop-nightly.yml | 2 +- scripts/check-desktop-nightly-workflow.mjs | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/desktop-nightly.yml b/.github/workflows/desktop-nightly.yml index 975f278..11407d5 100644 --- a/.github/workflows/desktop-nightly.yml +++ b/.github/workflows/desktop-nightly.yml @@ -60,7 +60,7 @@ jobs: uses: dtolnay/rust-toolchain@stable - name: Restore Rust build cache - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: | ~/.cargo/registry diff --git a/scripts/check-desktop-nightly-workflow.mjs b/scripts/check-desktop-nightly-workflow.mjs index 58c927b..6c1dabd 100644 --- a/scripts/check-desktop-nightly-workflow.mjs +++ b/scripts/check-desktop-nightly-workflow.mjs @@ -15,7 +15,6 @@ const requiredSnippets = [ ["manual trigger", "workflow_dispatch:"], ["scheduled trigger", "schedule:"], ["release write permission", "contents: write"], - ["Node 24 cache action", "actions/cache@v5"], ["Windows runner", "windows-latest"], ["macOS Apple Silicon runner", "macos-15"], ["macOS arm64 guard", 'test "$(uname -m)" = "arm64"'], @@ -37,8 +36,19 @@ for (const [label, snippet] of requiredSnippets) { } } -if (workflow.includes("actions/cache@v4")) { - fail("Desktop nightly workflow still uses actions/cache@v4, which targets the deprecated Node.js 20 runtime"); +const cacheActionVersions = Array.from( + workflow.matchAll(/uses:\s+actions\/cache@v(\d+)(?:\s|$)/g), + (match) => Number(match[1]), +); + +if (cacheActionVersions.length === 0) { + fail("Desktop nightly workflow missing Node 24-compatible cache action: actions/cache@v5 or newer"); +} + +const unsupportedCacheVersions = cacheActionVersions.filter((version) => version < 5); +if (unsupportedCacheVersions.length > 0) { + const versions = unsupportedCacheVersions.map((version) => `v${version}`).join(", "); + fail(`Desktop nightly workflow uses unsupported actions/cache version(s): ${versions}`); } console.log("Checked desktop nightly workflow");