From 9853dad78cef446fb45f04107f029cbf60f91a09 Mon Sep 17 00:00:00 2001 From: Edwin Sirko Date: Tue, 23 Jan 2024 15:30:45 -0500 Subject: [PATCH] v0.0.53: attempted fix --- action.yml | 2 +- dist/index.js | 10 ++++++++-- src/main.ts | 12 ++++++++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 3bb14d6..8bd76b7 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.52 + - uses: ddivad195/publish-action-package/package-and-publish@v0.0.53 id: publish - name: Output variables shell: bash diff --git a/dist/index.js b/dist/index.js index 149fcbc..5d0fc21 100644 --- a/dist/index.js +++ b/dist/index.js @@ -74764,8 +74764,14 @@ async function run() { } // Gather & validate user inputs const token = core.getInput('token'); - //const response = await fetch('http://echo.jsontest.com/url/https:--ghcr.io') // for testing locally - const response = await fetch(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 + ); if (!response.ok) { throw new Error(`Failed to fetch status page: ${response.statusText}`); } diff --git a/src/main.ts b/src/main.ts index 64d3597..ff6c31c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -40,9 +40,16 @@ export async function run(): Promise { // Gather & validate user inputs const token: string = core.getInput('token') - //const response = await fetch('http://echo.jsontest.com/url/https:--ghcr.io') // for testing locally + 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( - process.env.GITHUB_API_URL + '/packages/container-registry-url' + 'http://echo.jsontest.com/url/https:--ghcr.io' // for testing locally ) if (!response.ok) { throw new Error(`Failed to fetch status page: ${response.statusText}`) @@ -50,6 +57,7 @@ export async function run(): Promise { const registryURL: URL = new URL(await (await response.json()).url) console.log(core.getInput('registry')) console.log(`registryURL: ${registryURL}`) + // Paths to be included in the OCI image const paths: string[] = core.getInput('path').split(' ') let path = ''