Skip to content

Commit

Permalink
Merge pull request #128 from celo-org/pputman/install-dir-optional
Browse files Browse the repository at this point in the history
Pputman/install dir optional
  • Loading branch information
pputman-clabs authored Apr 17, 2024
2 parents 8e60ad2 + 4283440 commit dd5ce31
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/actions/npm-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ inputs:
required: true
check-auth-only:
description: "Check akeyless token access only"
type: boolean
default: false
required: false

Expand All @@ -49,32 +48,32 @@ 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
if: ${{ inputs.check-auth-only != 'true' }}
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
registry-url: ${{ inputs.registry-url }}

# Install yarn package manager
- name: 'Setup yarn'
if: ${{ inputs.check-auth-only }} != true
if: ${{ inputs.check-auth-only != 'true' }}
shell: bash
run: |
npm install --global yarn
# 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
if: ${{ inputs.check-auth-only != 'true' }}
with:
working-directory: ${{ inputs.install-dir }}

- run: yarn build
if: ${{ inputs.check-auth-only }} != true
if: ${{ inputs.check-auth-only != 'true' }}
shell: bash

- name: Set tag
if: ${{ inputs.check-auth-only }} != true
if: ${{ inputs.check-auth-only != 'true' }}
id: set-tag
shell: bash
run: |
Expand All @@ -95,7 +94,8 @@ 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
if: ${{ inputs.check-auth-only != 'true' }}
shell: bash
env:
# this is the access token in NPM. Note, even though it recommends
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/npm-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ on:
type: string
check-auth-only:
required: false
type: boolean
default: false
type: boolean

jobs:

Expand All @@ -53,4 +53,5 @@ 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 }}
# check-auth-only: ${{ fromJSON(inputs.check-auth-only) }}
check-auth-only: ${{ inputs.check-auth-only }}

0 comments on commit dd5ce31

Please sign in to comment.