mirror of
https://codeberg.org/icewind/attic-action.git
synced 2026-06-03 17:44:07 +02:00
Don't try to push store paths that were GCed
Previously we'd only push unique paths before/after the job, but that's not good enough because someone might run garbage collection. Now we only push unique store paths that are in the list of when the job finished.
This commit is contained in:
parent
490a246fbc
commit
13e2cf25a1
3 changed files with 8 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import * as core from '@actions/core';
|
||||
import { execFileSync } from 'child_process';
|
||||
import * as coreCommand from '@actions/core/lib/command'
|
||||
import * as exec from '@actions/exec';
|
||||
|
||||
|
|
@ -41,7 +42,7 @@ async function upload() {
|
|||
try {
|
||||
if (signingKey !== "" && skipPush !== 'true') {
|
||||
core.startGroup('Cachix: pushing paths');
|
||||
await exec.exec("sh", ["-c", `nix path-info --all | grep -v '\.drv$' | cat - /tmp/store-path-pre-build | sort | uniq -u | ${cachixExecutable} push ${name}`]);
|
||||
execFileSync(`${__dirname}/push-paths.sh`, [cachixExecutable, name], { stdio: 'inherit' });
|
||||
core.endGroup();
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue