From 120663b080ed6a891bfe6198f316bdb90b2dffa0 Mon Sep 17 00:00:00 2001 From: Edwin Sirko Date: Tue, 23 Jan 2024 15:35:38 -0500 Subject: [PATCH] v0.0.53 --- action.yml | 2 +- dist/index.js | 10 ++++------ src/main.ts | 12 ++++++------ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/action.yml b/action.yml index 8bd76b7..ef11001 100644 --- a/action.yml +++ b/action.yml @@ -33,7 +33,7 @@ runs: shell: bash # - run: node ./dist/index.js # shell: bash - - uses: ddivad195/publish-action-package/package-and-publish@v0.0.53 + - uses: ddivad195/publish-action-package/package-and-publish@v0.0.54 id: publish - name: Output variables shell: bash diff --git a/dist/index.js b/dist/index.js index 5d0fc21..db27bf3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -74764,20 +74764,18 @@ async function run() { } // Gather & validate user inputs const token = core.getInput('token'); - console.log('Official url: ' + - process.env.GITHUB_API_URL + - '/packages/container-registry-url'); + console.log(`Official url: ${process.env.GITHUB_API_URL + '/packages/container-registry-url'}`); //const response = await fetch( // process.env.GITHUB_API_URL + '/packages/container-registry-url' //) - const response = await fetch('http://echo.jsontest.com/url/https:--ghcr.io' // for testing locally + const response = await fetch('http://echo.jsontest.com/url/https:ghcr.io' // for testing locally. Remove the slashes, they will be reintroduced when forming the URL object below ); if (!response.ok) { throw new Error(`Failed to fetch status page: ${response.statusText}`); } const registryURL = new URL(await (await response.json()).url); - console.log(core.getInput('registry')); - console.log(`registryURL: ${registryURL}`); + console.log(`registryURL (supplied): ${core.getInput('registry')}`); + console.log(`registryURL (from URL): ${registryURL}`); // Paths to be included in the OCI image const paths = core.getInput('path').split(' '); let path = ''; diff --git a/src/main.ts b/src/main.ts index ff6c31c..fa4f72e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -41,22 +41,22 @@ export async function run(): Promise { const token: string = core.getInput('token') console.log( - 'Official url: ' + - process.env.GITHUB_API_URL + - '/packages/container-registry-url' + `Official url: ${ + process.env.GITHUB_API_URL + '/packages/container-registry-url' + }` ) //const response = await fetch( // process.env.GITHUB_API_URL + '/packages/container-registry-url' //) const response = await fetch( - 'http://echo.jsontest.com/url/https:--ghcr.io' // for testing locally + 'http://echo.jsontest.com/url/https:ghcr.io' // for testing locally. Remove the slashes, they will be reintroduced when forming the URL object below ) if (!response.ok) { throw new Error(`Failed to fetch status page: ${response.statusText}`) } const registryURL: URL = new URL(await (await response.json()).url) - console.log(core.getInput('registry')) - console.log(`registryURL: ${registryURL}`) + console.log(`registryURL (supplied): ${core.getInput('registry')}`) + console.log(`registryURL (from URL): ${registryURL}`) // Paths to be included in the OCI image const paths: string[] = core.getInput('path').split(' ')