Skip to content

Commit 6e78ab9

Browse files
committed
ok all actions fixed
1 parent f248974 commit 6e78ab9

File tree

6 files changed

+29
-61
lines changed

6 files changed

+29
-61
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,11 @@ jobs:
2121
path: |
2222
~/.cache/yarn
2323
node_modules
24-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
24+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', '**/package.json') }}
2525
restore-keys: |
26-
${{ runner.os }}-build-${{ env.cache-name }}-
27-
${{ runner.os }}-build-
28-
${{ runner.os }}-
29-
30-
- if: ${{ steps.cache-yarn.outputs.cache-hit != 'true' }}
31-
name: List the state of node modules
32-
continue-on-error: true
33-
run: yarn list
34-
35-
- name: Check node_modules
36-
uses: andstor/file-existence-action@v1
37-
with:
38-
files: 'node_modules'
39-
40-
# If the cache is not hit (we don't have a cache for this set of deps), then we need to install the dependencies
41-
# We're assuming the build and formatting process was already done
42-
- if: steps.check_files.outputs.files_exists != 'true'
43-
name: Install Dependencies
26+
${{ runner.os }}-yarn-
27+
- if: steps.cache-yarn.outputs.cache-hit != 'true'
28+
name: 📦 Install Dependencies
4429
env:
4530
NO_YARN_POSTINSTALL: 1
46-
run: NO_YARN_POSTINSTALL=1 yarn install --ignore-scripts
31+
run: yarn install --frozen-lockfile

.github/workflows/npm-publish-canary.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,14 @@ jobs:
3232
path: |
3333
~/.cache/yarn
3434
node_modules
35-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
35+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', '**/package.json') }}
3636
restore-keys: |
37-
${{ runner.os }}-build-${{ env.cache-name }}-
38-
${{ runner.os }}-build-
39-
${{ runner.os }}-
40-
41-
- run: ls -la
42-
- if: ${{ steps.cache-yarn.outputs.cache-hit != 'true' }}
43-
name: Install Dependencies
37+
${{ runner.os }}-yarn-
38+
- if: steps.cache-yarn.outputs.cache-hit != 'true'
39+
name: 📦 Install Dependencies
4440
env:
4541
NO_YARN_POSTINSTALL: 1
46-
run: yarn install --ignore-scripts
42+
run: yarn install --frozen-lockfile --ignore-scripts
4743

4844
- run: yarn publish-canary
4945
env:

.github/workflows/npm-publish-stable.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ jobs:
3030
path: |
3131
~/.cache/yarn
3232
node_modules
33-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
33+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', '**/package.json') }}
3434
restore-keys: |
35-
${{ runner.os }}-build-${{ env.cache-name }}-
36-
${{ runner.os }}-build-
37-
${{ runner.os }}-
38-
39-
- name: Install Dependencies
35+
${{ runner.os }}-yarn-
36+
- if: steps.cache-yarn.outputs.cache-hit != 'true'
37+
name: 📦 Install Dependencies
4038
run: NO_YARN_POSTINSTALL=1 yarn install --frozen-lockfile
4139

4240
- name: Yarn Build

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', '**/package.json') }}
2727
restore-keys: |
2828
${{ runner.os }}-yarn-
29-
30-
- name: 📦 Install Dependencies
29+
- if: steps.cache-yarn.outputs.cache-hit != 'true'
30+
name: 📦 Install Dependencies
3131
run: yarn install --frozen-lockfile
3232

3333
- name: 🔨 Build

.github/workflows/trunk-nightly.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,24 @@ jobs:
1818
uses: actions/checkout@v3
1919

2020
- name: Cache node modules
21-
id: cache-npm
21+
id: cache-yarn
2222
uses: actions/cache@v3
2323
env:
2424
cache-name: cache-node-module
2525
with:
2626
path: |
2727
~/.cache/yarn
2828
node_modules
29-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
29+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', '**/package.json') }}
3030
restore-keys: |
31-
${{ runner.os }}-build-${{ env.cache-name }}-
32-
${{ runner.os }}-build-
33-
${{ runner.os }}-
31+
${{ runner.os }}-yarn-
3432
35-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
36-
name: List the state of node modules
37-
continue-on-error: true
38-
run: npm list
39-
40-
- name: Install Dependencies
33+
- if: steps.cache-yarn.outputs.cache-hit != 'true'
34+
name: 📦 Install Dependencies
4135
env:
4236
NOYARNPOSTINSTALL: 1
43-
run: yarn install
37+
run: yarn install --frozen-lockfile
38+
4439
- name: Trunk Check
4540
uses: trunk-io/trunk-action@v1
4641
with:

.github/workflows/trunk-pr.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,21 @@ jobs:
1313
uses: actions/checkout@v3
1414

1515
- name: Cache node modules
16-
id: cache-npm
16+
id: cache-yarn
1717
uses: actions/cache@v3
1818
env:
1919
cache-name: cache-node-module
2020
with:
2121
path: |
2222
~/.cache/yarn
2323
node_modules
24-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
24+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', '**/package.json') }}
2525
restore-keys: |
26-
${{ runner.os }}-build-${{ env.cache-name }}-
27-
${{ runner.os }}-build-
28-
${{ runner.os }}-
26+
${{ runner.os }}-yarn-
27+
- if: steps.cache-yarn.outputs.cache-hit != 'true'
28+
name: 📦 Install Dependencies
29+
run: yarn install --frozen-lockfile
2930

30-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
31-
name: List the state of node modules
32-
continue-on-error: true
33-
run: npm list
34-
35-
- name: Install Dependencies
36-
run: yarn install
3731
- name: Trunk Check
3832
uses: trunk-io/trunk-action@v1
3933
with:

0 commit comments

Comments
 (0)