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
10
dist/main/index.js
vendored
10
dist/main/index.js
vendored
|
|
@ -977,6 +977,7 @@ const exec = __importStar(__webpack_require__(986));
|
|||
exports.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');
|
||||
|
|
@ -994,6 +995,15 @@ function setup() {
|
|||
core.startGroup(`Cachix: using cache ` + name);
|
||||
yield 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();
|
||||
yield 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