mirror of
https://codeberg.org/icewind/attic-action.git
synced 2026-06-03 09:34:11 +02:00
update system wide config
This commit is contained in:
parent
dbbdc70901
commit
0ea278e511
3 changed files with 41 additions and 8 deletions
24
dist/main/index.js
vendored
24
dist/main/index.js
vendored
|
|
@ -4313,20 +4313,36 @@ function setup() {
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
// for managed signing key and private caches
|
// for managed signing key and private caches
|
||||||
if (authToken !== "") {
|
if (authToken !== "") {
|
||||||
yield exec.exec('attic', ['login', name, instance, authToken]);
|
yield exec.exec('attic', ['login', name, instance, authToken], {
|
||||||
|
env: {
|
||||||
|
XDG_CONFIG_HOME: "/etc",
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
yield exec.exec('attic', ['login', name, instance]);
|
yield exec.exec('attic', ['login', name, instance], {
|
||||||
|
env: {
|
||||||
|
XDG_CONFIG_HOME: "/etc",
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
core.startGroup(`Attic: using cache ` + name);
|
core.startGroup(`Attic: using cache ` + name);
|
||||||
yield exec.exec('attic', ['use', name]);
|
yield exec.exec('attic', ['use', name], {
|
||||||
|
env: {
|
||||||
|
XDG_CONFIG_HOME: "/etc",
|
||||||
|
}
|
||||||
|
});
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
if (extraPullNames != "") {
|
if (extraPullNames != "") {
|
||||||
core.startGroup(`Attic: using extra caches ` + extraPullNames);
|
core.startGroup(`Attic: using extra caches ` + extraPullNames);
|
||||||
const extraPullNameList = extraPullNames.split(',');
|
const extraPullNameList = extraPullNames.split(',');
|
||||||
for (let itemName of extraPullNameList) {
|
for (let itemName of extraPullNameList) {
|
||||||
const trimmedItemName = itemName.trim();
|
const trimmedItemName = itemName.trim();
|
||||||
yield exec.exec('attic', ['use', trimmedItemName]);
|
yield exec.exec('attic', ['use', trimmedItemName], {
|
||||||
|
env: {
|
||||||
|
XDG_CONFIG_HOME: "/etc",
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
dist/main/push-paths.sh
vendored
1
dist/main/push-paths.sh
vendored
|
|
@ -11,4 +11,5 @@ if [[ $pathsToPush == "" ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export XDG_CONFIG_HOME=/etc
|
||||||
echo "$pathsToPush" | xargs "$attic" push $atticArgs "$cache"
|
echo "$pathsToPush" | xargs "$attic" push $atticArgs "$cache"
|
||||||
|
|
|
||||||
24
src/main.ts
24
src/main.ts
|
|
@ -31,13 +31,25 @@ async function setup() {
|
||||||
|
|
||||||
// for managed signing key and private caches
|
// for managed signing key and private caches
|
||||||
if (authToken !== "") {
|
if (authToken !== "") {
|
||||||
await exec.exec('attic', ['login', name, instance, authToken]);
|
await exec.exec('attic', ['login', name, instance, authToken], {
|
||||||
|
env: {
|
||||||
|
XDG_CONFIG_HOME: "/etc",
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
await exec.exec('attic', ['login', name, instance]);
|
await exec.exec('attic', ['login', name, instance], {
|
||||||
|
env: {
|
||||||
|
XDG_CONFIG_HOME: "/etc",
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
core.startGroup(`Attic: using cache ` + name);
|
core.startGroup(`Attic: using cache ` + name);
|
||||||
await exec.exec('attic', ['use', name]);
|
await exec.exec('attic', ['use', name], {
|
||||||
|
env: {
|
||||||
|
XDG_CONFIG_HOME: "/etc",
|
||||||
|
}
|
||||||
|
});
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
|
|
||||||
if (extraPullNames != "") {
|
if (extraPullNames != "") {
|
||||||
|
|
@ -45,7 +57,11 @@ async function setup() {
|
||||||
const extraPullNameList = extraPullNames.split(',');
|
const extraPullNameList = extraPullNames.split(',');
|
||||||
for (let itemName of extraPullNameList) {
|
for (let itemName of extraPullNameList) {
|
||||||
const trimmedItemName = itemName.trim();
|
const trimmedItemName = itemName.trim();
|
||||||
await exec.exec('attic', ['use', trimmedItemName]);
|
await exec.exec('attic', ['use', trimmedItemName], {
|
||||||
|
env: {
|
||||||
|
XDG_CONFIG_HOME: "/etc",
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue