mirror of
https://codeberg.org/icewind/attic-action.git
synced 2026-06-03 17:44:07 +02:00
Adds extra caches for pulling from (binary substitution).
Creates an `extraPullNames` parameter, to mimic the existing `name` parameter. This string should be a comma-separated set of cache names.
This commit is contained in:
parent
b5f0b56205
commit
49b785b55a
3 changed files with 23 additions and 0 deletions
11
src/main.ts
11
src/main.ts
|
|
@ -7,6 +7,7 @@ export const IsPost = !!process.env['STATE_isPost']
|
|||
|
||||
// inputs
|
||||
const name = core.getInput('name', { required: true });
|
||||
const extraPullNames = core.getInput('extraPullNames');
|
||||
const signingKey = core.getInput('signingKey');
|
||||
const authToken = core.getInput('authToken')
|
||||
const skipPush = core.getInput('skipPush');
|
||||
|
|
@ -27,6 +28,16 @@ async function setup() {
|
|||
await exec.exec('cachix', ['use', name]);
|
||||
core.endGroup();
|
||||
|
||||
if (extraPullNames != "") {
|
||||
core.startGroup(`Cachix: using extra caches ` + extraPullNames);
|
||||
const extraPullNameList = extraPullNames.split(',');
|
||||
for (let itemName of extraPullNameList) {
|
||||
const trimmedItemName = itemName.trim();
|
||||
await exec.exec('cachix', ['use', trimmedItemName]);
|
||||
}
|
||||
core.endGroup();
|
||||
}
|
||||
|
||||
if (signingKey !== "") {
|
||||
core.exportVariable('CACHIX_SIGNING_KEY', signingKey);
|
||||
// Remember existing store paths
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue