Cache Service Url not found, unable to restore cache
Using the cache package identically as the actions/cache@v2 action it breaks with
Error: getCacheEntry failed: Cache Service Url not found, unable to restore cache.
at /home/runner/work/benchmark/benchmark/node_modules/@actions/cache/src/internal/requestUtils.ts:92:9
at Generator.next (<anonymous>)
at fulfilled (/home/runner/work/benchmark/benchmark/node_modules/@actions/cache/lib/internal/requestUtils.js:5:58)
Why are the ACTIONS_CACHE_URL ACTIONS_RUNTIME_URL only available in the action? Who magically injects them and when?
If this is not a bug, is this page meant to be used exclusively within the Github action and never on its own?
Bump @dhadka @bryanmacfarlane @jclem @konradpabjan @dhadka (sorry for tagging you I'm not sure you have notifications enabled for this repo :pray: )
@dapplion are you using a composite action? I had to change from composite action to a nodejs action to get the variables injected.
Unfortunately, these 2 variables are for internal use only, see https://github.com/nektos/act/issues/329#issuecomment-766960494.
If this is not a bug, is this page meant to be used exclusively within the Github action and never on its own?
I would appreciate the README to explicitly state this.
Can confirm what @sidharthv96 experienced. When using composite custom action, caching from @actions/cache would not work, internal env vars were not being populated. After converting to JavaScript custom action, it worked out of the box.
I'm finding the opposite (not sure if it's related). I'm using @actions/cache as a library and find that cache.isFeatureAvailable() is always returning false, within a CI run on my custom action (running on Github Actions).