From 5f106d59667e8d15720e16a4ea8bfaecf226f61b Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Wed, 19 Jul 2023 10:41:57 +0800 Subject: [PATCH] filter default paths --- src/stages/push.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/stages/push.ts b/src/stages/push.ts index 6e7f216..07584a8 100644 --- a/src/stages/push.ts +++ b/src/stages/push.ts @@ -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]); }