From 8f82e9985d7eb85f35c319aae549477c2ee0b6e3 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 14 Dec 2023 15:16:15 -0500 Subject: [PATCH] booleans for outputs --- .github/workflows/module-plugin-test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/module-plugin-test.yml b/.github/workflows/module-plugin-test.yml index 1387a69..d43be49 100644 --- a/.github/workflows/module-plugin-test.yml +++ b/.github/workflows/module-plugin-test.yml @@ -129,40 +129,40 @@ jobs: if [[ -f vendor/${{ inputs.module-repo }}/package.json ]] then echo "Has package.json file" - echo "hasPackageJson='true'" >> $GITHUB_OUTPUT + echo "hasPackageJson=true" >> $GITHUB_OUTPUT else echo "Does not have package.json file" - echo "hasPackageJson='false'" >> $GITHUB_OUTPUT + echo "hasPackageJson=false" >> $GITHUB_OUTPUT fi - name: Check Module for build script id: build shell: bash run: | - if grep -wq '"build":' vendor/${{ inputs.module-repo }}/package.json; + if [[ -f vendor/${{ inputs.module-repo }}/package.json ]] && grep -wq '"build":' vendor/${{ inputs.module-repo }}/package.json; then echo "Has build command" - echo "hasBuildCommand='true'" >> $GITHUB_OUTPUT + echo "hasBuildCommand=true" >> $GITHUB_OUTPUT else echo "Does not have build command" - echo "hasBuildCommand='false'" >> $GITHUB_OUTPUT + echo "hasBuildCommand=false" >> $GITHUB_OUTPUT fi - name: Setup Registry for Module working-directory: vendor/${{ inputs.module-repo }} - if: ${{ steps.package.outputs.hasPackageJson == 'true' }} + if: ${{ steps.package.outputs.hasPackageJson == true }} 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 == 'true' }} + if: ${{ steps.package.outputs.hasPackageJson == true }} run: npm ci --legacy-peer-deps - name: Build Module if build command exists working-directory: vendor/${{ inputs.module-repo }} if: | - ${{ steps.package.outputs.hasPackageJson == 'true' }} && - ${{ steps.build.outputs.hasBuildCommand == 'true' }} + ${{ steps.package.outputs.hasPackageJson == true }} && + ${{ steps.build.outputs.hasBuildCommand == true }} run: npm run build # step to sync js package files with build files