diff --git a/.github/actions/npm-publish/action.yml b/.github/actions/npm-publish/action.yml index 4727c71..2cea5ef 100644 --- a/.github/actions/npm-publish/action.yml +++ b/.github/actions/npm-publish/action.yml @@ -28,6 +28,11 @@ inputs: akeyless-token-path: description: "Akeyless token path" required: true + check-auth-only: + description: "Check akeyless token access only" + type: boolean + default: false + required: false runs: using: "composite" @@ -44,6 +49,7 @@ runs: # Setup Node JS with input from node version and set the registry url # (defaults to npm registry) - name: 'Setup Node JS' + if: ${{ inputs.check-auth-only }} != true uses: actions/setup-node@v4 with: node-version: ${{ inputs.node-version }} @@ -51,6 +57,7 @@ runs: # Install yarn package manager - name: 'Setup yarn' + if: ${{ inputs.check-auth-only }} != true shell: bash run: | npm install --global yarn @@ -58,13 +65,16 @@ runs: # Clabs uses yarn so npm ci (the ci/cd version of npm install) won't work # without a json.package lock file, so must use yarn here too - uses: bahmutov/npm-install@v1 + if: ${{ inputs.check-auth-only }} != true with: working-directory: ${{ inputs.install-dir }} - run: yarn build + if: ${{ inputs.check-auth-only }} != true shell: bash - name: Set tag + if: ${{ inputs.check-auth-only }} != true id: set-tag shell: bash run: | @@ -85,6 +95,7 @@ runs: cd ${{ inputs.package-dir }} && \ npm publish --tag ${{ steps.set-tag.outputs.tag }} --provenance --access ${{ inputs.package-access }} fi + if: ${{ inputs.check-auth-only }} != true shell: bash env: # this is the access token in NPM. Note, even though it recommends diff --git a/.github/workflows/npm-publish.yaml b/.github/workflows/npm-publish.yaml index 7742a55..6777508 100644 --- a/.github/workflows/npm-publish.yaml +++ b/.github/workflows/npm-publish.yaml @@ -29,6 +29,10 @@ on: akeyless-token-path: required: true type: string + check-auth-only: + default: false + type: boolean + jobs: npm-publish: @@ -47,3 +51,4 @@ jobs: akeyless-api-gateway: ${{ inputs.akeyless-api-gateway }} akeyless-github-access-id: ${{ inputs.akeyless-github-access-id }} akeyless-token-path: ${{ inputs.akeyless-token-path }} + check-auth-only: ${{ inputs.check-auth-only }}