File tree Expand file tree Collapse file tree 1 file changed +33
-16
lines changed Expand file tree Collapse file tree 1 file changed +33
-16
lines changed Original file line number Diff line number Diff line change 99
99
100
100
jobs :
101
101
cache-and-install :
102
- runs-on : ubuntu-latest
102
+ runs-on : ubuntu-20.04
103
103
104
104
steps :
105
- build :
106
- - uses : actions/checkout@v2
107
-
108
- - name : Cache pnpm modules
109
- uses : actions/cache@v2
110
- with :
111
- path : ~/.pnpm-store
112
- key : ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
113
- restore-keys : |
114
- ${{ runner.os }}-
115
-
116
-
117
- with :
118
- version : 6.0.2
119
- run_install : true
105
+ - name : Checkout
106
+ uses : actions/checkout@v3
107
+ with :
108
+ fetch-depth : 0
109
+
110
+ - name : Install Node.js
111
+ uses : actions/setup-node@v3
112
+ with :
113
+ node-version : 16
114
+
115
+
116
+ name : Install pnpm
117
+ id : pnpm-install
118
+ with :
119
+ version : 7
120
+ run_install : false
121
+
122
+ - name : Get pnpm store directory
123
+ id : pnpm-cache
124
+ run : |
125
+ echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
126
+
127
+ - uses : actions/cache@v3
128
+ name : Setup pnpm cache
129
+ with :
130
+ path : ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
131
+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
132
+ restore-keys : |
133
+ ${{ runner.os }}-pnpm-store-
134
+
135
+ - name : Install dependencies
136
+ run : pnpm install
120
137
` ` `
121
138
122
139
**Note:** You don't need to run ` pnpm store prune` at the end; post-action has already taken care of that.
You can’t perform that action at this time.
0 commit comments