Skip to content

Commit d978edc

Browse files
authored
ci: Cache repos fetched by gittar (#1781)
1 parent 9ebd4ff commit d978edc

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,33 @@ jobs:
2020
strategy:
2121
matrix:
2222
node-version: [12.x, 14.x]
23+
2324
steps:
2425
- uses: actions/checkout@v2
2526
with:
2627
fetch-depth: 1
28+
2729
- name: Use Node.js ${{ matrix.node-version }}
2830
uses: actions/setup-node@v1
2931
with:
3032
node-version: ${{ matrix.node-version }}
33+
34+
- uses: actions/cache@v3
35+
id: gittar-cache
36+
with:
37+
path: ~/.gittar
38+
key: ${{ runner.os }}-gittar
39+
3140
- name: Get yarn cache directory path
3241
id: yarn-cache-dir-path
3342
run: echo "::set-output name=dir::$(yarn cache dir)"
34-
- uses: actions/cache@v1
35-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
43+
- uses: actions/cache@v3
44+
id: yarn-cache
3645
with:
3746
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
3847
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
3948
restore-keys: ${{ runner.os }}-yarn-
49+
4050
- run: yarn install --frozen-lockfile
4151
- name: test
4252
env:

0 commit comments

Comments
 (0)