diff --git a/action.yml b/action.yml index d381e56..dd5dcdb 100644 --- a/action.yml +++ b/action.yml @@ -28,11 +28,11 @@ runs: shell: bash # - run: node ./dist/index.js # shell: bash - - uses: ddivad195/publish-action-package/package-and-publish@v0.0.57 + - uses: ddivad195/publish-action-package/package-and-publish@v0.0.58 id: publish - with: - token: ${{ github.token }} - who-to-greet: ${{ env.registry }} + env: + TOKEN: ${{ github.token }} + who_to_greet: ${{ env.registry }} - name: Output variables shell: bash run: | diff --git a/dist/index.js b/dist/index.js index 52c4280..bfd72d1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -74742,9 +74742,9 @@ const semver_1 = __importDefault(__nccwpck_require__(11383)); async function run() { const tmpDirs = []; try { - const whoToGreet = core.getInput('who-to-greet', { required: true }); + const whoToGreet = process.env.who_to_greet; core.info(`Hello, ${whoToGreet}!`); - const token2 = core.getInput('token', { required: true }); + const token2 = process.env.TOKEN; core.info(`Hello, ${token2}!`); // Parse and validate Actions execution context, including the repository name, release name and event type const repository = process.env.GITHUB_REPOSITORY || ''; diff --git a/package-and-publish/action.yml b/package-and-publish/action.yml index 738810f..d67f77c 100644 --- a/package-and-publish/action.yml +++ b/package-and-publish/action.yml @@ -7,11 +7,6 @@ branding: color: 'red' inputs: - token: - required: true - description: > - GITHUB_TOKEN having the write:package scope to publish an action package to GHCR. - default: ${{ github.token }} path: required: false description: The work directory or path to be tar archived and uploaded as OCI Artifact layer. diff --git a/src/main.ts b/src/main.ts index 620fdfc..b8f1f37 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,9 +13,9 @@ export async function run(): Promise { const tmpDirs: string[] = [] try { - const whoToGreet = core.getInput('who-to-greet', { required: true }) + const whoToGreet = process.env.who_to_greet core.info(`Hello, ${whoToGreet}!`) - const token2 = core.getInput('token', { required: true }) + const token2 = process.env.TOKEN core.info(`Hello, ${token2}!`) // Parse and validate Actions execution context, including the repository name, release name and event type