Skip to content

Commit 4401640

Browse files
committed
[TASK] Add yarn cache
1 parent 460764d commit 4401640

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- uses: actions/cache@v2
3232
with:
3333
path: ${{ steps.composer-cache.outputs.dir }}
34-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock', '**/composer.json') }}
34+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
3535
restore-keys: |
3636
${{ runner.os }}-composer-
3737
@@ -42,6 +42,18 @@ jobs:
4242
run: |
4343
composer cgl:ci
4444
45+
- name: Get yarn cache directory path
46+
id: yarn-cache-dir-path
47+
run: echo "::set-output name=dir::$(yarn cache dir)"
48+
49+
- uses: actions/cache@v2
50+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
51+
with:
52+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
53+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
54+
restore-keys: |
55+
${{ runner.os }}-yarn-
56+
4557
- name: Yarn install
4658
run: yarn install --silent
4759

0 commit comments

Comments
 (0)