@@ -9,31 +9,21 @@ inputs:
9
9
language :
10
10
description : The language to retrieve dependencies.
11
11
required : false
12
- cache_version :
13
- description : the cache version that includes the common change hash
14
- required : true
15
- skip_yarn :
16
- description : true if you want to skip yarn install
17
- required : false
18
12
19
13
runs :
20
14
using : composite
21
15
steps :
22
16
# JavaScript setup
23
17
- name : Get yarn cache directory path
24
18
shell : bash
25
- if : ${{ inputs.skip_yarn != 'true' }}
26
19
id : yarn-cache-dir
27
- run : |
28
- echo "::set-output name=dir::$(yarn config get cacheFolder)"
29
- echo "::set-output name=cache::$(< .github/.cache_version)"
20
+ run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
30
21
31
22
- name : Restore Yarn
32
- if : ${{ inputs.skip_yarn != 'true' }}
33
23
uses : actions/cache@v2
34
24
with :
35
25
path : ${{ steps.yarn-cache-dir.outputs.dir || '.yarn/cache' }}
36
- key : node-cache-${{ steps.yarn-cache-dir.outputs.cache }}-yarn-${{ hashFiles('yarn.lock') }}
26
+ key : node-cache-${{ env.CACHE_VERSION }}-yarn-${{ hashFiles('yarn.lock') }}
37
27
38
28
# Java setup: used during 'java' generation or 'cts'
39
29
- name : Download Java formatter
48
38
with :
49
39
path : specs/bundled/abtesting.yml
50
40
key : |
51
- ${{ inputs.cache_version }}-${{
41
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
52
42
hashFiles(
53
43
'specs/abtesting/**',
54
44
'specs/common/**'
60
50
with :
61
51
path : specs/bundled/analytics.yml
62
52
key : |
63
- ${{ inputs.cache_version }}-${{
53
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
64
54
hashFiles(
65
55
'specs/analytics/**',
66
56
'specs/common/**'
72
62
with :
73
63
path : specs/bundled/insights.yml
74
64
key : |
75
- ${{ inputs.cache_version }}-${{
65
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
76
66
hashFiles(
77
67
'specs/insights/**',
78
68
'specs/common/**'
84
74
with :
85
75
path : specs/bundled/personalization.yml
86
76
key : |
87
- ${{ inputs.cache_version }}-${{
77
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
88
78
hashFiles(
89
79
'specs/personalization/**',
90
80
'specs/common/**'
96
86
with :
97
87
path : specs/bundled/predict.yml
98
88
key : |
99
- ${{ inputs.cache_version }}-${{
89
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
100
90
hashFiles(
101
91
'specs/predict/**',
102
92
'specs/common/**'
108
98
with :
109
99
path : specs/bundled/query-suggestions.yml
110
100
key : |
111
- ${{ inputs.cache_version }}-${{
101
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
112
102
hashFiles(
113
103
'specs/query-suggestions/**',
114
104
'specs/common/**'
@@ -120,7 +110,7 @@ runs:
120
110
with :
121
111
path : specs/bundled/recommend.yml
122
112
key : |
123
- ${{ inputs.cache_version }}-${{
113
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
124
114
hashFiles(
125
115
'specs/recommend/**',
126
116
'specs/common/**'
@@ -132,7 +122,7 @@ runs:
132
122
with :
133
123
path : specs/bundled/search.yml
134
124
key : |
135
- ${{ inputs.cache_version }}-${{
125
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
136
126
hashFiles(
137
127
'specs/search/**',
138
128
'specs/common/**'
@@ -144,7 +134,7 @@ runs:
144
134
with :
145
135
path : specs/bundled/algoliasearch-lite.yml
146
136
key : |
147
- ${{ inputs.cache_version }}-${{
137
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
148
138
hashFiles(
149
139
'specs/search/**',
150
140
'specs/common/**'
@@ -156,7 +146,7 @@ runs:
156
146
with :
157
147
path : specs/bundled/sources.yml
158
148
key : |
159
- ${{ inputs.cache_version }}-${{
149
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
160
150
hashFiles(
161
151
'specs/sources/**',
162
152
'specs/common/**'
@@ -169,7 +159,7 @@ runs:
169
159
with :
170
160
path : clients/algoliasearch-client-javascript/packages/client-common
171
161
key : |
172
- ${{ inputs.cache_version }}-${{
162
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
173
163
hashFiles(
174
164
'clients/algoliasearch-client-javascript/packages/client-common/src/**'
175
165
)}}
@@ -180,7 +170,7 @@ runs:
180
170
with :
181
171
path : clients/algoliasearch-client-javascript/packages/requester-node-http
182
172
key : |
183
- ${{ inputs.cache_version }}-${{
173
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
184
174
hashFiles(
185
175
'clients/algoliasearch-client-javascript/packages/requester-node-http/src/**'
186
176
)}}
@@ -191,7 +181,7 @@ runs:
191
181
with :
192
182
path : clients/algoliasearch-client-javascript/packages/requester-browser-xhr
193
183
key : |
194
- ${{ inputs.cache_version }}-${{
184
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
195
185
hashFiles(
196
186
'clients/algoliasearch-client-javascript/packages/requester-browser-xhr/src/**'
197
187
)}}
@@ -203,7 +193,7 @@ runs:
203
193
with :
204
194
path : clients/algoliasearch-client-javascript/packages/algoliasearch
205
195
key : |
206
- ${{ inputs.cache_version }}-${{
196
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
207
197
hashFiles(
208
198
'clients/algoliasearch-client-javascript/packages/algoliasearch/**',
209
199
'clients/algoliasearch-client-javascript/packages/client-search/**',
@@ -217,7 +207,7 @@ runs:
217
207
with :
218
208
path : clients/algoliasearch-client-javascript/packages/algoliasearch-lite
219
209
key : |
220
- ${{ inputs.cache_version }}-${{
210
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
221
211
hashFiles(
222
212
'clients/algoliasearch-client-javascript/packages/algoliasearch-lite/src/**',
223
213
'clients/algoliasearch-client-javascript/packages/algoliasearch-lite/model/**',
@@ -234,7 +224,7 @@ runs:
234
224
with :
235
225
path : clients/algoliasearch-client-javascript/packages/client-search
236
226
key : |
237
- ${{ inputs.cache_version }}-${{
227
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
238
228
hashFiles(
239
229
'clients/algoliasearch-client-javascript/packages/client-search/src/**',
240
230
'clients/algoliasearch-client-javascript/packages/client-search/model/**',
@@ -251,7 +241,7 @@ runs:
251
241
with :
252
242
path : clients/algoliasearch-client-javascript/packages/recommend
253
243
key : |
254
- ${{ inputs.cache_version }}-${{
244
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
255
245
hashFiles(
256
246
'clients/algoliasearch-client-javascript/packages/recommend/src/**',
257
247
'clients/algoliasearch-client-javascript/packages/recommend/model/**',
@@ -268,7 +258,7 @@ runs:
268
258
with :
269
259
path : clients/algoliasearch-client-javascript/packages/client-query-suggestions
270
260
key : |
271
- ${{ inputs.cache_version }}-${{
261
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
272
262
hashFiles(
273
263
'clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/**',
274
264
'clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/**',
@@ -285,7 +275,7 @@ runs:
285
275
with :
286
276
path : clients/algoliasearch-client-javascript/packages/client-personalization
287
277
key : |
288
- ${{ inputs.cache_version }}-${{
278
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
289
279
hashFiles(
290
280
'clients/algoliasearch-client-javascript/packages/client-personalization/src/**',
291
281
'clients/algoliasearch-client-javascript/packages/client-personalization/model/**',
@@ -302,7 +292,7 @@ runs:
302
292
with :
303
293
path : clients/algoliasearch-client-javascript/packages/client-analytics
304
294
key : |
305
- ${{ inputs.cache_version }}-${{
295
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
306
296
hashFiles(
307
297
'clients/algoliasearch-client-javascript/packages/client-analytics/src/**',
308
298
'clients/algoliasearch-client-javascript/packages/client-analytics/model/**',
@@ -319,7 +309,7 @@ runs:
319
309
with :
320
310
path : clients/algoliasearch-client-javascript/packages/client-abtesting
321
311
key : |
322
- ${{ inputs.cache_version }}-${{
312
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
323
313
hashFiles(
324
314
'clients/algoliasearch-client-javascript/packages/client-abtesting/src/**',
325
315
'clients/algoliasearch-client-javascript/packages/client-abtesting/model/**',
@@ -336,7 +326,7 @@ runs:
336
326
with :
337
327
path : clients/algoliasearch-client-javascript/packages/client-insights
338
328
key : |
339
- ${{ inputs.cache_version }}-${{
329
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
340
330
hashFiles(
341
331
'clients/algoliasearch-client-javascript/packages/client-insights/src/**',
342
332
'clients/algoliasearch-client-javascript/packages/client-insights/model/**',
@@ -353,7 +343,7 @@ runs:
353
343
with :
354
344
path : clients/algoliasearch-client-javascript/packages/client-sources
355
345
key : |
356
- ${{ inputs.cache_version }}-${{
346
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
357
347
hashFiles(
358
348
'clients/algoliasearch-client-javascript/packages/client-sources/src/**',
359
349
'clients/algoliasearch-client-javascript/packages/client-sources/model/**',
@@ -370,7 +360,7 @@ runs:
370
360
with :
371
361
path : clients/algoliasearch-client-javascript/packages/client-predict
372
362
key : |
373
- ${{ inputs.cache_version }}-${{
363
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
374
364
hashFiles(
375
365
'clients/algoliasearch-client-javascript/packages/client-predict/src/**',
376
366
'clients/algoliasearch-client-javascript/packages/client-predict/model/**',
@@ -388,7 +378,7 @@ runs:
388
378
with :
389
379
path : clients/algoliasearch-client-java-2/gradle.properties
390
380
key : |
391
- ${{ inputs.cache_version }}-${{
381
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
392
382
hashFiles(
393
383
'specs/bundled/search.yml',
394
384
'templates/java/**',
@@ -403,7 +393,7 @@ runs:
403
393
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/api/SearchClient.java
404
394
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/model/search/**
405
395
key : |
406
- ${{ inputs.cache_version }}-${{
396
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
407
397
hashFiles(
408
398
'specs/bundled/search.yml',
409
399
'templates/java/**',
@@ -418,7 +408,7 @@ runs:
418
408
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/api/RecommendClient.java
419
409
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/model/recommend/**
420
410
key : |
421
- ${{ inputs.cache_version }}-${{
411
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
422
412
hashFiles(
423
413
'specs/bundled/recommend.yml',
424
414
'templates/java/**',
@@ -433,7 +423,7 @@ runs:
433
423
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/api/PersonalizationClient.java
434
424
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/model/personalization/**
435
425
key : |
436
- ${{ inputs.cache_version }}-${{
426
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
437
427
hashFiles(
438
428
'specs/bundled/personalization.yml',
439
429
'templates/java/**',
@@ -448,7 +438,7 @@ runs:
448
438
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/api/AnalyticsClient.java
449
439
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/model/analytics/**
450
440
key : |
451
- ${{ inputs.cache_version }}-${{
441
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
452
442
hashFiles(
453
443
'specs/bundled/analytics.yml',
454
444
'templates/java/**',
@@ -463,7 +453,7 @@ runs:
463
453
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/api/InsightsClient.java
464
454
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/model/insights/**
465
455
key : |
466
- ${{ inputs.cache_version }}-${{
456
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
467
457
hashFiles(
468
458
'specs/bundled/insights.yml',
469
459
'templates/java/**',
@@ -478,7 +468,7 @@ runs:
478
468
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/api/AbtestingClient.java
479
469
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/model/abtesting/**
480
470
key : |
481
- ${{ inputs.cache_version }}-${{
471
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
482
472
hashFiles(
483
473
'specs/bundled/abtesting.yml',
484
474
'templates/java/**',
@@ -493,7 +483,7 @@ runs:
493
483
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/api/QuerySuggestionsClient.java
494
484
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/model/querySuggestions/**
495
485
key : |
496
- ${{ inputs.cache_version }}-${{
486
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
497
487
hashFiles(
498
488
'specs/bundled/query-suggestions.yml',
499
489
'templates/java/**',
@@ -508,7 +498,7 @@ runs:
508
498
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/api/PredictClient.java
509
499
clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/model/predict/**
510
500
key : |
511
- ${{ inputs.cache_version }}-${{
501
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
512
502
hashFiles(
513
503
'specs/bundled/predict.yml',
514
504
'templates/java/**',
@@ -524,7 +514,7 @@ runs:
524
514
clients/algoliasearch-client-php/lib/Api/SearchClient.php
525
515
clients/algoliasearch-client-php/lib/Model/Search/**
526
516
key : |
527
- ${{ inputs.cache_version }}-${{
517
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
528
518
hashFiles(
529
519
'specs/bundled/search.yml',
530
520
'templates/php/**',
@@ -539,7 +529,7 @@ runs:
539
529
clients/algoliasearch-client-php/lib/Api/RecommendClient.php
540
530
clients/algoliasearch-client-php/lib/Model/Recommend/**
541
531
key : |
542
- ${{ inputs.cache_version }}-${{
532
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
543
533
hashFiles(
544
534
'specs/bundled/recommend.yml',
545
535
'templates/php/**',
@@ -554,7 +544,7 @@ runs:
554
544
clients/algoliasearch-client-php/lib/Api/PersonalizationClient.php
555
545
clients/algoliasearch-client-php/lib/Model/Personalization/**
556
546
key : |
557
- ${{ inputs.cache_version }}-${{
547
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
558
548
hashFiles(
559
549
'specs/bundled/personalization.yml',
560
550
'templates/php/**',
@@ -569,7 +559,7 @@ runs:
569
559
clients/algoliasearch-client-php/lib/Api/AnalyticsClient.php
570
560
clients/algoliasearch-client-php/lib/Model/Analytics/**
571
561
key : |
572
- ${{ inputs.cache_version }}-${{
562
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
573
563
hashFiles(
574
564
'specs/bundled/analytics.yml',
575
565
'templates/php/**',
@@ -584,7 +574,7 @@ runs:
584
574
clients/algoliasearch-client-php/lib/Api/InsightsClient.php
585
575
clients/algoliasearch-client-php/lib/Model/Insights/**
586
576
key : |
587
- ${{ inputs.cache_version }}-${{
577
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
588
578
hashFiles(
589
579
'specs/bundled/insights.yml',
590
580
'templates/php/**',
@@ -599,7 +589,7 @@ runs:
599
589
clients/algoliasearch-client-php/lib/Api/AbtestingClient.php
600
590
clients/algoliasearch-client-php/lib/Model/Abtesting/**
601
591
key : |
602
- ${{ inputs.cache_version }}-${{
592
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
603
593
hashFiles(
604
594
'specs/bundled/abtesting.yml',
605
595
'templates/php/**',
@@ -614,7 +604,7 @@ runs:
614
604
clients/algoliasearch-client-php/lib/Api/QuerySuggestionsClient.php
615
605
clients/algoliasearch-client-php/lib/Model/QuerySuggestions/**
616
606
key : |
617
- ${{ inputs.cache_version }}-${{
607
+ ${{ env.CACHE_VERSION }}-${{ env.CACHE_COMMON_HASH }}-${{
618
608
hashFiles(
619
609
'specs/bundled/query-suggestions.yml',
620
610
'templates/php/**',
@@ -623,5 +613,4 @@ runs:
623
613
624
614
- name : Install JavaScript dependencies
625
615
shell : bash
626
- if : ${{ inputs.skip_yarn != 'true' }}
627
616
run : YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install
0 commit comments