Skip to content

Commit 0d929d9

Browse files
committed
chore: simplify github action
1 parent c5cb6c7 commit 0d929d9

File tree

2 files changed

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

2 files changed

+6
-20
lines changed

.github/actions/setup/action.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,12 @@ runs:
1515
with:
1616
path: |
1717
**/node_modules
18-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
18+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
1919
restore-keys: |
20+
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
2021
${{ runner.os }}-yarn-
2122
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-
3023
- name: Install dependencies
31-
if: steps.yarn-cache.outputs.cache-hit != 'true' || steps.changes.outputs.package-json == 'true'
24+
if: steps.yarn-cache.outputs.cache-hit != 'true'
3225
run: yarn install --frozen-lockfile
3326
shell: bash

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

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,13 @@ runs:
1515
with:
1616
path: |
1717
**/node_modules
18-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
18+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
1919
restore-keys: |
20+
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
2021
${{ runner.os }}-yarn-
2122
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-
3023
- name: Install dependencies
31-
if: steps.yarn-cache.outputs.cache-hit != 'true' || steps.changes.outputs.package-json == 'true'
24+
if: steps.yarn-cache.outputs.cache-hit != 'true'
3225
run: |
3326
yarn install --cwd example --frozen-lockfile
3427
yarn install --frozen-lockfile

0 commit comments

Comments
 (0)