Skip to content

Commit

Permalink
check if package files exist before install step
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Dec 14, 2023
1 parent 3ec1cfe commit 113b188
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/module-plugin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,23 @@ jobs:

- name: Setup Registry for Module
working-directory: ./vendor/${{ inputs.module-repo }}
# if: ${{ secrets.registry-token }}
if: ${{ hashFiles('package.json') }}
run: printf "\n//npm.pkg.github.com/:_authToken=${{ secrets.NEWFOLD_ACCESS_TOKEN }}" >> .npmrc

- name: NPM Install for Module
- name: NPM Install for Module if package.json exists
working-directory: ./vendor/${{ inputs.module-repo }}
if: ${{ hashFiles('package.json') }}
run: npm ci --legacy-peer-deps

- name: Build Module if build command exists
working-directory: ./vendor/${{ inputs.module-repo }}
if: |
${{ hashFiles('package.json') }}
grep -wq `"build":` package.json
run: npm run build

# step to sync js package files with build files

- name: Setup Registry for Plugin
# if: ${{ secrets.registry-token }}
run: printf "\n//npm.pkg.github.com/:_authToken=${{ secrets.NEWFOLD_ACCESS_TOKEN }}" >> .npmrc
Expand Down

0 comments on commit 113b188

Please sign in to comment.