mirror of
https://github.com/ryanccn/attic-action.git
synced 2024-11-19 22:16:35 +00:00
filter default paths
This commit is contained in:
parent
58ea71f13c
commit
5f106d5966
1 changed files with 9 additions and 1 deletions
|
@ -15,7 +15,15 @@ export const push = async () => {
|
|||
core.info("Pushing to cache");
|
||||
const oldPaths = JSON.parse(core.getState("initial-paths")) as string[];
|
||||
const newPaths = await getStorePaths();
|
||||
const addedPaths = newPaths.filter((p) => !oldPaths.includes(p));
|
||||
const addedPaths = newPaths
|
||||
.filter((p) => !oldPaths.includes(p))
|
||||
.filter(
|
||||
(p) =>
|
||||
!p.endsWith(".drv") &&
|
||||
!p.endsWith(".drv.chroot") &&
|
||||
!p.endsWith(".check") &&
|
||||
!p.endsWith(".lock")
|
||||
);
|
||||
|
||||
await exec("attic", ["push", cache, ...addedPaths]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue