Skip to content

Commit c2b4385

Browse files
committed
feat(ci): improve composite action
1 parent 7619c3b commit c2b4385

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/actions/setup-environment/action.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ runs:
1212
uses: actions/cache@v3
1313
env:
1414
cache-name: cache-asdf
15+
cache-path: ~/.asdf
1516
with:
16-
path: ~/.asdf
17+
path: ${{ env.cache-path }}
1718
key: ${{ runner.os }}-se-${{ env.cache-name }}-${{ hashFiles('**/.tool-versions') }}
1819
restore-keys: |
1920
${{ runner.os }}-se-${{ env.cache-name }}-
@@ -28,11 +29,12 @@ runs:
2829
uses: actions/cache@v3
2930
env:
3031
cache-name: cache-npm
32+
cache-path: ~/.npm
3133
with:
32-
path: ~/.npm
33-
key: ${{ runner.os }}-se-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
34+
path: ${{ env.cache-path }}
35+
key: ${{ runner.os }}-se-${{ env.cache-name }}-${{ hashFiles('**/.tool-versions') }}-${{ hashFiles('**/package-lock.json') }}
3436
restore-keys: |
35-
${{ runner.os }}-se-${{ env.cache-name }}-
37+
${{ runner.os }}-se-${{ env.cache-name }}-${{ hashFiles('**/.tool-versions') }}-
3638
3739
- name: 📥 Install dependencies
3840
shell: bash

0 commit comments

Comments
 (0)