[GH-ISSUE #306] yanr-cache is not supported #216

Closed
opened 2026-03-01 21:41:20 +03:00 by kerem · 3 comments
Owner

Originally created by @rafilkmp3 on GitHub (Jul 15, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/306

Im using the following action to have cache to my yarn but dont work with act

      - name: Get yarn cache directory path
        id: yarn-cache-dir-path
        run: echo "::set-output name=dir::$(yarn cache dir)"
      - uses: actions/cache@v2
        id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
        with:
          path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-

I get this error

ERRO[0015] Unable to interpolate string '${{ steps.yarn-cache-dir-path.outputs.dir }}' - [ReferenceError: 'cache' is not defined]
[Lint on PRs/Lint on Prs] ⭐  Run actions/cache@v2
[Lint on PRs/Lint on Prs]   ☁  git clone 'https://github.com/actions/cache' # ref=v2
[Lint on PRs/Lint on Prs]   🐳  docker cp src=/Users/myuser/.cache/act/actions-cache@v2 dst=/actions/
[Lint on PRs/Lint on Prs]   ❓  ::save-state name=CACHE_KEY::Linux-yarn-23b4f114f83611ef940ffe19e3011bfe81ee2891759aaf728af6c8cd6522b667
[Lint on PRs/Lint on Prs]   ❗  ::error::Input required and not supplied: path
[Lint on PRs/Lint on Prs]   ❌  Failure - actions/cache@v2
Error: exit with `FAILURE`: 1
Originally created by @rafilkmp3 on GitHub (Jul 15, 2020). Original GitHub issue: https://github.com/nektos/act/issues/306 Im using the following action to have cache to my yarn but dont work with act ``` - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - uses: actions/cache@v2 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- ``` I get this error ``` ERRO[0015] Unable to interpolate string '${{ steps.yarn-cache-dir-path.outputs.dir }}' - [ReferenceError: 'cache' is not defined] [Lint on PRs/Lint on Prs] ⭐ Run actions/cache@v2 [Lint on PRs/Lint on Prs] ☁ git clone 'https://github.com/actions/cache' # ref=v2 [Lint on PRs/Lint on Prs] 🐳 docker cp src=/Users/myuser/.cache/act/actions-cache@v2 dst=/actions/ [Lint on PRs/Lint on Prs] ❓ ::save-state name=CACHE_KEY::Linux-yarn-23b4f114f83611ef940ffe19e3011bfe81ee2891759aaf728af6c8cd6522b667 [Lint on PRs/Lint on Prs] ❗ ::error::Input required and not supplied: path [Lint on PRs/Lint on Prs] ❌ Failure - actions/cache@v2 Error: exit with `FAILURE`: 1 ```
kerem 2026-03-01 21:41:20 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@github-actions[bot] commented on GitHub (Sep 14, 2020):

Issue is stale and will be closed in 7 days unless there is new activity

<!-- gh-comment-id:691748871 --> @github-actions[bot] commented on GitHub (Sep 14, 2020): Issue is stale and will be closed in 7 days unless there is new activity
Author
Owner

@reinvanimschoot commented on GitHub (Mar 11, 2021):

Was this something that you eventually found a fix for?

<!-- gh-comment-id:796626333 --> @reinvanimschoot commented on GitHub (Mar 11, 2021): Was this something that you eventually found a fix for?
Author
Owner

@catthehacker commented on GitHub (Mar 11, 2021):

@reinvanimschoot
actions/cache in act depends on #329, once that gets fixed it will work properly.
Currently you can "cache" stuff using

  -r, --reuse                  reuse action containers to maintain state
<!-- gh-comment-id:796709495 --> @catthehacker commented on GitHub (Mar 11, 2021): @reinvanimschoot `actions/cache` in `act` depends on #329, once that gets fixed it will work properly. Currently you can "cache" stuff using ``` -r, --reuse reuse action containers to maintain state ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#216
No description provided.