Archive the cached dir relative, not by its absolute path
Each run gets a fresh per-run workspace (~/.cache/act/<hash>/hostexecutor), so embedding the absolute path meant the next run restored into a stale workspace and the cache never actually sped up a build. Save with -C <parent> <basename> so entries are <basename>/... and restores can extract into the run's own path input location.
This commit is contained in:
@@ -23,6 +23,9 @@ A Gitea Action that caches build files as `tar.xz` archives on the runner filesy
|
||||
2. Stores archives at `~/.cache/.cache-store/<key>.tar.xz`
|
||||
3. Restores by extracting the archive to `/`, saves by creating one
|
||||
4. Saves atomically (write to `<key>.tar.xz.tmp`, then rename)
|
||||
5. Archives store the cached directory **relative** (`<basename>/...`), not its
|
||||
absolute path — a later run restores into its own `path` location, so the
|
||||
cache works across runs even though each run gets a fresh workspace
|
||||
|
||||
## Cache Retention
|
||||
|
||||
|
||||
Reference in New Issue
Block a user