From 107e42e00c852bbdf4dd4407ca47d124ffc9ca76 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Fri, 24 Nov 2023 01:24:50 -0500 Subject: [PATCH] bypass cache closes https://github.com/pkgxdev/pantry/issues/4195 closes https://github.com/pkgxdev/pantry/issues/4197 --- actions/cache/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/actions/cache/action.yml b/actions/cache/action.yml index a98a3888..8e745545 100644 --- a/actions/cache/action.yml +++ b/actions/cache/action.yml @@ -21,11 +21,12 @@ runs: - uses: actions/cache@v3 # in containers this has issues because github.workspace != $GITHUB_WORKSPACE - if: ${{ github.workspace }} == ${{ steps.os-cache.outputs.GITHUB_WORKSPACE }} + if: github.workspace == steps.os-cache.outputs.GITHUB_WORKSPACE with: path: | ~/.deno ${{ steps.os-cache.outputs.cache }} - # This isn't perfect (can't hash stuff outside $GITHUB_WORKSPACE, and if the there scripts change, the hash won't) + # This isn't perfect (can't hash stuff outside github.workspace, and if the there scripts change, the hash won't) + # additionally, in containerized runs, github.workspace != $GITHUB_WORKSPACE, so we can't use this at all, hence the if above. # but it's good enough for now. It's slightly conservative, since it monitors all .ts files, but that's fine. key: ${{ runner.os }}-deno-${{ inputs.cache-name }}-${{ hashFiles('**/deno.jsonc', '**/*.ts') }}