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') }}