From db837389992a5f594a34625ef0aa6e46fffe6b79 Mon Sep 17 00:00:00 2001 From: Matthew Rodusek <7519129+bitwizeshift@users.noreply.github.com> Date: Sat, 16 Dec 2023 09:49:50 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Encode=20runner=20in=20the=20`ca?= =?UTF-8?q?rgo-install`=20cache=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cache key used for the `cargo-install` component action was a generic string of `cargo-install-`, which did not encode the OS that the runner is running on. This appeared to be fine for a while, but is now failing between macOS and Linux; with my suspicions being that this is due to it allowing cross-os caching for Linux and macOS. The docs for the cross-OS feature only calls out Windows as the cross-target, so it's unsure if this is actually the reason. At any rate, the fix is easy enough, and for correctness this is what should have been done anyway. --- .github/actions/cargo-install/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/cargo-install/action.yaml b/.github/actions/cargo-install/action.yaml index b84ed75..c0fa7c1 100644 --- a/.github/actions/cargo-install/action.yaml +++ b/.github/actions/cargo-install/action.yaml @@ -18,7 +18,7 @@ runs: uses: actions/cache@v3 with: path: .cargo/bin/${{ inputs.target }} - key: cargo-install-${{ inputs.target }} + key: cargo-install-${{ runner.os }}-${{ inputs.target }} - name: Install cargo binary if: steps.cargo-install.outputs.cache-hit != 'true'