cache doesn't work with github workspace directory
See original GitHub issueHi, I’m trying to cache the whole workspace to fetch it between jobs. Unfortunately it seems like the local directory can not be cached
Using . doesn’t work (it cache 22B)
- name: Cache build folder
uses: actions/cache@v3
with:
key: cs-repo-${{ github.run_number }}-${{ github.run_attempt }}
path: .
Using ${{ github.workspace }} doesn’t work (it also cache 22B)
- name: Cache build folder
uses: actions/cache@v3
with:
key: cs-repo-${{ github.run_number }}-${{ github.run_attempt }}
path: ${{ github.workspace }}
the only solution I found which work is to list all the files/directory
- name: Cache build folder
uses: actions/cache@v3
with:
key: cs-repo-${{ github.run_number }}-${{ github.run_attempt }}
path: |
file1
file2
dir1
dir2
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Cache doesn't work when the project is not in the root of ...
Use this directory to look for the pyproject.toml and cached deps. Justification: Caching doesn't work for projects where the project is not in ......
Read more >Cache - excluding files or folders with ! not working #713
Describe the bug Excluding a file or folder does not work as expected with caching. For example, ~/cache !~/cache/subfolder is matching: .
Read more >Caching dependencies to speed up workflows
To cache dependencies for a job, you can use GitHub's cache action. The action creates and restores a cache identified by a unique...
Read more >Support hashing files outside the workspace directory #1035
Currently hashFiles ignores files outside the workspace. This means that it cannot be used to hash files which appear within an Action.
Read more >setup-python failing due to missing cache directory #328
Description: This job on my repo has been failing since #303 was merged in. Only the python 11 alpha variant is failing due...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pdotl I confirm it’s now fixed 💯
It doesn’t seems to be fixed for some reason 😕 I’ve tested with actions/cache@v3.0.1 both the two version with . and env variable and it still cache 22B @pdotl