Skip to content

Commit

Permalink
echo feedback and expect boolean values
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Dec 14, 2023
1 parent 1580ca8 commit 541f7b9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/module-plugin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ jobs:
run: |
if [[ -f package.json ]]
then
echo "Has package.json file"
echo "hasPackageJson=true" >> $GITHUB_OUTPUT
else
echo "Does not have package.json file"
echo "hasPackageJson=false" >> $GITHUB_OUTPUT
fi
Expand All @@ -141,25 +143,27 @@ jobs:
run: |
if grep -wq '"build":' package.json;
then
echo "Has build command"
echo "hasBuildCommand=true" >> $GITHUB_OUTPUT
else
echo "Does not have build command"
echo "hasBuildCommand=false" >> $GITHUB_OUTPUT
fi
- name: Setup Registry for Module
working-directory: ./vendor/${{ inputs.module-repo }}
if: ${{ steps.package.outputs.hasPackageJson != '' }}
if: ${{ steps.package.outputs.hasPackageJson }}
run: printf "\n//npm.pkg.github.com/:_authToken=${{ secrets.NEWFOLD_ACCESS_TOKEN }}" >> .npmrc

- name: NPM Install for Module if package.json exists
working-directory: ./vendor/${{ inputs.module-repo }}
if: ${{ steps.package.outputs.hasPackageJson != '' }}
if: ${{ steps.package.outputs.hasPackageJson }}
run: npm ci --legacy-peer-deps

- name: Build Module if build command exists
working-directory: ./vendor/${{ inputs.module-repo }}
if: |
${{ steps.build.outputs.hasBuildCommand != '' }}
${{ steps.build.outputs.hasBuildCommand }}
run: npm run build

# step to sync js package files with build files
Expand Down

0 comments on commit 541f7b9

Please sign in to comment.