diff --git a/action.yml b/action.yml index 0c6ecce..bcc62ab 100644 --- a/action.yml +++ b/action.yml @@ -23,7 +23,6 @@ inputs: source-pr: description: The PR of `magic-nix-cache` to use. Conflicts with all other `source-*` options. required: false - default: 10 source-revision: description: The revision of `nix-magic-nix-cache` to use. Conflicts with all other `source-*` options. required: false diff --git a/dist/index.js b/dist/index.js index 417c77e..5831399 100644 --- a/dist/index.js +++ b/dist/index.js @@ -12118,8 +12118,8 @@ const gotClient = got$1.extend({ function getCacherUrl() { const runnerArch = process.env.RUNNER_ARCH; const runnerOs = process.env.RUNNER_OS; - const binarySuffix = `magic-nix-cache-${runnerArch}-${runnerOs}`; - const urlPrefix = `https://magic-nix-cache-priv20231208150408868500000001.s3.us-east-2.amazonaws.com`; + const binarySuffix = `${runnerArch}-${runnerOs}`; + const urlPrefix = `https://install.determinate.systems/magic-nix-cache-priv`; if (coreExports.getInput('source-url')) { return coreExports.getInput('source-url'); } @@ -12127,7 +12127,7 @@ function getCacherUrl() { return `${urlPrefix}/tag/${coreExports.getInput('source-tag')}/${binarySuffix}`; } if (coreExports.getInput('source-pr')) { - return `${urlPrefix}/pr_${coreExports.getInput('source-pr')}/${binarySuffix}`; + return `${urlPrefix}/pr/${coreExports.getInput('source-pr')}/${binarySuffix}`; } if (coreExports.getInput('source-branch')) { return `${urlPrefix}/branch/${coreExports.getInput('source-branch')}/${binarySuffix}`; @@ -12140,7 +12140,7 @@ function getCacherUrl() { async function fetchAutoCacher() { const binary_url = getCacherUrl(); coreExports.info(`Fetching the Magic Nix Cache from ${binary_url}`); - const { stdout } = await promisify$1(exec)(`curl "${binary_url}" | xz -d | nix-store --import`); + const { stdout } = await promisify$1(exec)(`curl -L "${binary_url}" | xz -d | nix-store --import`); const paths = stdout.split(os$2.EOL); // Since the export is in reverse topologically sorted order, magic-nix-cache is always the penultimate entry in the list (the empty string left by split being the last). const last_path = paths.at(-2); diff --git a/src/index.ts b/src/index.ts index 4e79825..cf2790e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,9 +32,8 @@ const gotClient = got.extend({ function getCacherUrl() : string { const runnerArch = process.env.RUNNER_ARCH; const runnerOs = process.env.RUNNER_OS; - const binarySuffix = `magic-nix-cache-${runnerArch}-${runnerOs}`; - const urlPrefix = `https://magic-nix-cache-priv20231208150408868500000001.s3.us-east-2.amazonaws.com`; - + const binarySuffix = `${runnerArch}-${runnerOs}`; + const urlPrefix = `https://install.determinate.systems/magic-nix-cache-priv`; if (core.getInput('source-url')) { return core.getInput('source-url'); } @@ -44,7 +43,7 @@ function getCacherUrl() : string { } if (core.getInput('source-pr')) { - return `${urlPrefix}/pr_${core.getInput('source-pr')}/${binarySuffix}`; + return `${urlPrefix}/pr/${core.getInput('source-pr')}/${binarySuffix}`; } if (core.getInput('source-branch')) { @@ -62,7 +61,7 @@ async function fetchAutoCacher() { const binary_url = getCacherUrl(); core.info(`Fetching the Magic Nix Cache from ${binary_url}`); - const { stdout } = await promisify(exec)(`curl "${binary_url}" | xz -d | nix-store --import`); + const { stdout } = await promisify(exec)(`curl -L "${binary_url}" | xz -d | nix-store --import`); const paths = stdout.split(os.EOL);