Skip to content

Commit 4f47b38

Browse files
committed
fix: don't skip install on ci if package.json files changed
1 parent 74a70bf commit 4f47b38

File tree

2 files changed

+18
-2
lines changed
  • .github/actions/setup
  • packages/create-react-native-library/templates/common/$.github/actions/setup

2 files changed

+18
-2
lines changed

.github/actions/setup/action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ runs:
1919
restore-keys: |
2020
${{ runner.os }}-yarn-
2121
22+
- name: Check for changes
23+
uses: dorny/paths-filter@v2
24+
id: changes
25+
with:
26+
filters: |
27+
package-json:
28+
- '**/package.json'
29+
2230
- name: Install dependencies
23-
if: steps.yarn-cache.outputs.cache-hit != 'true'
31+
if: steps.yarn-cache.outputs.cache-hit != 'true' || steps.changes.outputs.package-json == 'true'
2432
run: yarn install --frozen-lockfile
2533
shell: bash

packages/create-react-native-library/templates/common/$.github/actions/setup/action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@ runs:
1919
restore-keys: |
2020
${{ runner.os }}-yarn-
2121
22+
- name: Check for changes
23+
uses: dorny/paths-filter@v2
24+
id: changes
25+
with:
26+
filters: |
27+
package-json:
28+
- '**/package.json'
29+
2230
- name: Install dependencies
23-
if: steps.yarn-cache.outputs.cache-hit != 'true'
31+
if: steps.yarn-cache.outputs.cache-hit != 'true' || steps.changes.outputs.package-json == 'true'
2432
run: |
2533
yarn install --cwd example --frozen-lockfile
2634
yarn install --frozen-lockfile

0 commit comments

Comments
 (0)