Excluded sub directory not working
See original GitHub issueHey there! The README.md provides an example where an excluded sub-path is provided. Unfortunately that sub-path still ends up in the cache. Here is a modified example using the local maven repository.
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: |
~/.m2
!~/.m2/pro/taskana
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
Reading out on the next (cached) build the files in ~/.m2/pro/taskana
are contained in the cache. The following adjustment didn’t work either:
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: |
~/.m2
!~/.m2/pro/taskana/**
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
Is this a bug or am I having the wrong expectations? Our current workaround is to delete that subfolder in a dedicated step. It works, but is kinda annoying.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Exclude sub directories from find: why is -not -path not working?
I'm trying to run simian and pass a file argument into it, but excluding a directory just isn't working. The Lib directory is...
Read more >Exclude subdirectory not working with grep command
This works for me, in that it excludes the "foo" directory from the root directory of the search: grep -rn --exclude-dir=foo 'custom'.
Read more >Exclude subdirectory pattern for the tree command not working
I want to exclude every files that match a gitignore pattern. The solution found here seems promising. Unfortunately it seems that the tree ......
Read more >Exclude a subdirectory from the explorer using exact path ...
Steps to Reproduce: Create a directory public with a subdirectory bundle; Create a settings.json file under the .vscode directory; Add the ...
Read more >Subdirectories are not excluded by Integrity Monitoring in the ...
As workaround, prevent subdirectories from being included to the baseline by putting an asterisk sign (*) to the Include Files With Names Like...
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
@dhadka Since it doesn’t appear that this issue will be resolved any time soon, I suggest that you update the example in the README. The current example is misleading since it won’t work as expected.
Changing
~/cache
to~/cache/*
should be a functional example.~/cache/*
matches all subdirectories, and then!~/cache/exclude
will exclude that particular subdirectory.@mustaphazorgati Thanks for reporting this (and sorry I didn’t see this earlier). I was able to reproduce this issue. I filed a bug over in the actions/toolkit repo that hosts the underlying logic for search patterns.