From ac306b4799d1351f037fd07c1fde1b8515e75c5e Mon Sep 17 00:00:00 2001 From: boxofyellow <54955040+boxofyellow@users.noreply.github.com> Date: Fri, 26 Jan 2024 12:18:00 -0800 Subject: [PATCH] after npm run package --- dist/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/index.js b/dist/index.js index fb91e07..a5fa348 100644 --- a/dist/index.js +++ b/dist/index.js @@ -75061,13 +75061,6 @@ async function run(pathInput) { return; } const token = process.env.TOKEN; - const response = await fetch(process.env.GITHUB_API_URL + '/packages/container-registry-url'); - if (!response.ok) { - throw new Error(`Failed to fetch status page: ${response.statusText}`); - } - const data = await response.json(); - const registryURL = new URL(data.url); - console.log(`Container registry URL: ${registryURL}`); // Gather & validate user input // Paths to be included in the OCI image // const paths: string[] = core.getInput('path').split(' ') @@ -75097,6 +75090,13 @@ async function run(pathInput) { const manifestHash = manifestSHA .update(JSON.stringify(manifest)) .digest('hex'); + const response = await fetch(`${process.env.GITHUB_API_URL}/packages/container-registry-url`); + if (!response.ok) { + throw new Error(`Failed to fetch status page: ${response.statusText}`); + } + const data = await response.json(); + const registryURL = new URL(data.url); + console.log(`Container registry URL: ${registryURL}`); const packageURL = await ghcr.publishOCIArtifact(token, registryURL, repository, releaseId.toString(), targetVersion.raw, archives.zipFile, archives.tarFile, manifest, true); core.setOutput('package-url', packageURL.toString()); core.setOutput('package-manifest', JSON.stringify(manifest));