v0.0.64: got rid of registry input

This commit is contained in:
Edwin Sirko
2024-01-26 16:34:39 +00:00
committed by ddivad195
parent 61a702939a
commit 2016180627
3 changed files with 7 additions and 17 deletions
+1 -5
View File
@@ -11,10 +11,6 @@ inputs:
required: false required: false
description: The work directory or path to be tar archived and uploaded as OCI Artifact layer. description: The work directory or path to be tar archived and uploaded as OCI Artifact layer.
default: '.' default: '.'
registry:
required: false
description: The registry to publish the action package to.
default: https://ghcr.io/ # TODO: this should perhaps be fetched from GitHub API.
outputs: outputs:
package-url: package-url:
@@ -28,7 +24,7 @@ runs:
shell: bash shell: bash
# - run: node ./dist/index.js # - run: node ./dist/index.js
# shell: bash # shell: bash
- uses: ddivad195/publish-action-package/[email protected]3 - uses: ddivad195/publish-action-package/[email protected]4
id: publish id: publish
env: env:
TOKEN: ${{ github.token }} TOKEN: ${{ github.token }}
Generated Vendored
+3 -4
View File
@@ -74762,9 +74762,8 @@ async function run() {
core.setFailed(`${releaseTag} is not a valid semantic version, and so cannot be uploaded as an Immutable Action.`); core.setFailed(`${releaseTag} is not a valid semantic version, and so cannot be uploaded as an Immutable Action.`);
return; return;
} }
// Gather & validate user inputs
const token = process.env.TOKEN; const token = process.env.TOKEN;
console.log(`Official url: ${process.env.GITHUB_API_URL + '/packages/container-registry-url'}`); // TODO: once https://github.com/github/github/pull/309384 goes in, we can switch to the actual endpoint
//const response = await fetch( //const response = await fetch(
// process.env.GITHUB_API_URL + '/packages/container-registry-url' // process.env.GITHUB_API_URL + '/packages/container-registry-url'
//) //)
@@ -74775,8 +74774,8 @@ async function run() {
} }
const data = await response.json(); const data = await response.json();
const registryURL = new URL(data.url); const registryURL = new URL(data.url);
console.log(`registryURL (supplied): ${core.getInput('registry')}`); // TODO: get rid of the `registry` input console.log(`Container registry URL: ${registryURL}`);
console.log(`registryURL (from URL): ${registryURL}`); // Gather & validate user input
// Paths to be included in the OCI image // Paths to be included in the OCI image
const paths = core.getInput('path').split(' '); const paths = core.getInput('path').split(' ');
let path = ''; let path = '';
+3 -8
View File
@@ -37,14 +37,9 @@ export async function run(): Promise<void> {
return return
} }
// Gather & validate user inputs
const token: string = process.env.TOKEN! const token: string = process.env.TOKEN!
console.log( // TODO: once https://github.com/github/github/pull/309384 goes in, we can switch to the actual endpoint
`Official url: ${
process.env.GITHUB_API_URL + '/packages/container-registry-url'
}`
)
//const response = await fetch( //const response = await fetch(
// process.env.GITHUB_API_URL + '/packages/container-registry-url' // process.env.GITHUB_API_URL + '/packages/container-registry-url'
//) //)
@@ -56,9 +51,9 @@ export async function run(): Promise<void> {
} }
const data = await response.json() const data = await response.json()
const registryURL: URL = new URL(data.url) const registryURL: URL = new URL(data.url)
console.log(`registryURL (supplied): ${core.getInput('registry')}`) // TODO: get rid of the `registry` input console.log(`Container registry URL: ${registryURL}`)
console.log(`registryURL (from URL): ${registryURL}`)
// Gather & validate user input
// Paths to be included in the OCI image // Paths to be included in the OCI image
const paths: string[] = core.getInput('path').split(' ') const paths: string[] = core.getInput('path').split(' ')
let path = '' let path = ''