Skip to content

Commit

Permalink
update condition to run npm ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ZheSun88 committed Jan 10, 2025
1 parent f7b7546 commit 85a3b85
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,25 @@ runs:
node_modules
packages/ts/*/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}
- name: Get all changed package*.json files
id: changed-package-json-files
uses: tj-actions/changed-files@v45
with:
files: |
package.json
packages/ts/*/package.json
- name: List all changed json files
if: steps.changed-package-json-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-package-json-files.outputs.all_changed_files }}
shell: bash
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
- name: Install npm dependencies
if: ${{ steps.cache-node_modules.outputs.cache-hit != 'true' }}
if: ${{ steps.cache-node_modules.outputs.cache-hit != 'true' }} && {{ steps.changed-json-files.outputs.any_changed == 'true' }}
shell: bash
run: npm ci

0 comments on commit 85a3b85

Please sign in to comment.