mirror of
https://codeberg.org/icewind/attic-action.git
synced 2026-06-03 09:34:11 +02:00
use upstream attic install script
This commit is contained in:
parent
f2dc9e5daf
commit
bb732b5b8b
3 changed files with 71 additions and 6 deletions
4
dist/main/index.js
vendored
4
dist/main/index.js
vendored
|
|
@ -4299,9 +4299,7 @@ const skipPush = core.getInput('skipPush');
|
||||||
const pathsToPush = core.getInput('pathsToPush');
|
const pathsToPush = core.getInput('pathsToPush');
|
||||||
const pushFilter = core.getInput('pushFilter');
|
const pushFilter = core.getInput('pushFilter');
|
||||||
const atticArgs = core.getInput('atticArgs');
|
const atticArgs = core.getInput('atticArgs');
|
||||||
const installCommand = core.getInput('installCommand') ||
|
const installCommand = core.getInput('installCommand') || `${__dirname}/install-attic-ci.sh`;
|
||||||
"nix-store -r /nix/store/0zplda5sjpr44lrgh47rrg67iv1f3bam-attic-0.1.0 --extra-substituters https://attic-action.cachix.org --extra-trusted-public-keys attic-action.cachix.org-1:3Iqcq1PU6FJmNWyfSMKcx2HIBei6fybMIgVBcHS5Uvc=" +
|
|
||||||
"&& nix profile install github:zhaofengli/attic?rev=5f85e35a25085b75e1cbb6cc7291726fa4fab2ed#attic --extra-experimental-features 'nix-command flakes'";
|
|
||||||
function setup() {
|
function setup() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
69
dist/main/install-attic-ci.sh
vendored
Executable file
69
dist/main/install-attic-ci.sh
vendored
Executable file
|
|
@ -0,0 +1,69 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
expr=$(mktemp)
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
rm -f "$expr"
|
||||||
|
}
|
||||||
|
|
||||||
|
cat >"$expr" <<'EOF'
|
||||||
|
{ system ? builtins.currentSystem }:
|
||||||
|
let
|
||||||
|
maybeStorePath = if builtins ? langVersion && builtins.lessThan 1 builtins.langVersion
|
||||||
|
then builtins.storePath
|
||||||
|
else x: x;
|
||||||
|
mkFakeDerivation = attrs: outputs:
|
||||||
|
let
|
||||||
|
outputNames = builtins.attrNames outputs;
|
||||||
|
common = attrs // outputsSet //
|
||||||
|
{ type = "derivation";
|
||||||
|
outputs = outputNames;
|
||||||
|
all = outputsList;
|
||||||
|
};
|
||||||
|
outputToAttrListElement = outputName:
|
||||||
|
{ name = outputName;
|
||||||
|
value = common // {
|
||||||
|
inherit outputName;
|
||||||
|
outPath = maybeStorePath (builtins.getAttr outputName outputs);
|
||||||
|
drvPath = maybeStorePath (builtins.getAttr outputName outputs);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
outputsList = map outputToAttrListElement outputNames;
|
||||||
|
outputsSet = builtins.listToAttrs outputsList;
|
||||||
|
in outputsSet;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
"x86_64-linux" = (mkFakeDerivation {
|
||||||
|
name = "attic-static-x86_64-unknown-linux-musl-0.1.0";
|
||||||
|
system = "x86_64-linux";
|
||||||
|
} {
|
||||||
|
out = "/nix/store/qi9cixkq0pj60yw1y5l28hid7f53310i-attic-static-x86_64-unknown-linux-musl-0.1.0";
|
||||||
|
}).out;
|
||||||
|
|
||||||
|
"aarch64-linux" = (mkFakeDerivation {
|
||||||
|
name = "attic-0.1.0";
|
||||||
|
system = "aarch64-linux";
|
||||||
|
} {
|
||||||
|
out = "/nix/store/ng1aykmyk7ayzrn69hlv4n4qzbywj5rk-attic-0.1.0";
|
||||||
|
}).out;
|
||||||
|
|
||||||
|
"x86_64-darwin" = (mkFakeDerivation {
|
||||||
|
name = "attic-0.1.0";
|
||||||
|
system = "x86_64-darwin";
|
||||||
|
} {
|
||||||
|
out = "/nix/store/zh35fhdyxnxzp1mjyla95g2yv2ayzc3f-attic-0.1.0";
|
||||||
|
}).out;
|
||||||
|
|
||||||
|
"aarch64-darwin" = (mkFakeDerivation {
|
||||||
|
name = "attic-0.1.0";
|
||||||
|
system = "aarch64-darwin";
|
||||||
|
} {
|
||||||
|
out = "/nix/store/z9i4grsf3h0wdlbhg95v6nanxiqx5xvp-attic-0.1.0";
|
||||||
|
}).out;
|
||||||
|
|
||||||
|
}.${system}
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
nix-env --substituters "https://staging.attic.rs/attic-ci https://cache.nixos.org" --trusted-public-keys "attic-ci:U5Sey4mUxwBXM3iFapmP0/ogODXywKLRNgRPQpEXxbo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" -if "$expr"
|
||||||
|
|
@ -15,9 +15,7 @@ const pushFilter = core.getInput('pushFilter');
|
||||||
const atticArgs = core.getInput('atticArgs');
|
const atticArgs = core.getInput('atticArgs');
|
||||||
|
|
||||||
const installCommand =
|
const installCommand =
|
||||||
core.getInput('installCommand') ||
|
core.getInput('installCommand') || `${__dirname}/install-attic-ci.sh`;
|
||||||
"nix-store -r /nix/store/0zplda5sjpr44lrgh47rrg67iv1f3bam-attic-0.1.0 --extra-substituters https://attic-action.cachix.org --extra-trusted-public-keys attic-action.cachix.org-1:3Iqcq1PU6FJmNWyfSMKcx2HIBei6fybMIgVBcHS5Uvc=" +
|
|
||||||
"&& nix profile install github:zhaofengli/attic?rev=5f85e35a25085b75e1cbb6cc7291726fa4fab2ed#attic --extra-experimental-features 'nix-command flakes'";
|
|
||||||
|
|
||||||
async function setup() {
|
async function setup() {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue