forked from Mirror/attic-action
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");
|
core.info("Pushing to cache");
|
||||||
const oldPaths = JSON.parse(core.getState("initial-paths")) as string[];
|
const oldPaths = JSON.parse(core.getState("initial-paths")) as string[];
|
||||||
const newPaths = await getStorePaths();
|
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]);
|
await exec("attic", ["push", cache, ...addedPaths]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue