Skip to content

Commit 1b46e2d

Browse files
committed
chore(ci): fix built client cache
1 parent 96d73e6 commit 1b46e2d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.github/actions/cache/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,35 @@ runs:
1616
uses: actions/cache@v2
1717
with:
1818
path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-javascript/client-search/dist
19-
key: ${{ runner.os }}-js-client-search-${{ hashFiles('yarn.lock') }}
19+
key: ${{ runner.os }}-js-client-search-${{ find -s clients/algoliasearch-client-javascript/client-search/dist -type f -exec sha1sum {} \; | sha1sum }}
2020

2121
- name: Restore built JavaScript recommend client
2222
if: ${{ inputs.job == 'cts' }}
2323
uses: actions/cache@v2
2424
with:
2525
path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-javascript/recommend/dist
26-
key: ${{ runner.os }}-js-client-recommend-${{ hashFiles('yarn.lock') }}
26+
key: ${{ runner.os }}-js-client-recommend-${{ find -s clients/algoliasearch-client-javascript/recommend/dist -type f -exec sha1sum {} \; | sha1sum }}
2727

2828
- name: Restore built JavaScript personalization client
2929
if: ${{ inputs.job == 'cts' }}
3030
uses: actions/cache@v2
3131
with:
3232
path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-javascript/client-personalization/dist
33-
key: ${{ runner.os }}-js-client-personalization-${{ hashFiles('yarn.lock') }}
33+
key: ${{ runner.os }}-js-client-personalization-${{ find -s clients/algoliasearch-client-javascript/client-personalization/dist -type f -exec sha1sum {} \; | sha1sum }}
3434

3535
- name: Restore built JavaScript analytics client
3636
if: ${{ inputs.job == 'cts' }}
3737
uses: actions/cache@v2
3838
with:
3939
path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-javascript/client-analytics/dist
40-
key: ${{ runner.os }}-js-client-analytics-${{ hashFiles('yarn.lock') }}
40+
key: ${{ runner.os }}-js-client-analytics-${{ find -s clients/algoliasearch-client-javascript/client-analytics/dist -type f -exec sha1sum {} \; | sha1sum }}
4141

4242
- name: Restore built Java client
4343
if: ${{ inputs.job == 'cts' }}
4444
uses: actions/cache@v2
4545
with:
4646
path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-java-2/target
47-
key: ${{ runner.os }}-java-client-${{ hashFiles('**/pom.xml') }}
47+
key: ${{ runner.os }}-java-client-${{ find -s clients/algoliasearch-client-javascript/algoliasearch-client-java-2/target -type f -exec sha1sum {} \; | sha1sum }}
4848

4949
# setup yarn
5050
- name: Get yarn cache directory path

.github/workflows/check.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
uses: actions/cache@v2
113113
with:
114114
path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-javascript/client-search/dist
115-
key: ${{ runner.os }}-js-client-search-${{ hashFiles('yarn.lock') }}
115+
key: ${{ runner.os }}-js-client-search-${{ find -s clients/algoliasearch-client-javascript/client-search/dist -type f -exec sha1sum {} \; | sha1sum }}
116116

117117
client_javascript_recommend:
118118
runs-on: ubuntu-20.04
@@ -134,7 +134,7 @@ jobs:
134134
uses: actions/cache@v2
135135
with:
136136
path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-javascript/recommend/dist
137-
key: ${{ runner.os }}-js-client-recommend-${{ hashFiles('yarn.lock') }}
137+
key: ${{ runner.os }}-js-client-recommend-${{ find -s clients/algoliasearch-client-javascript/recommend/dist -type f -exec sha1sum {} \; | sha1sum }}
138138

139139
client_javascript_perso:
140140
runs-on: ubuntu-20.04
@@ -156,7 +156,7 @@ jobs:
156156
uses: actions/cache@v2
157157
with:
158158
path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-javascript/client-personalization/dist
159-
key: ${{ runner.os }}-js-client-personalization-${{ hashFiles('yarn.lock') }}
159+
key: ${{ runner.os }}-js-client-personalization-${{ find -s clients/algoliasearch-client-javascript/client-personalization/dist -type f -exec sha1sum {} \; | sha1sum }}
160160

161161
client_javascript_analytics:
162162
runs-on: ubuntu-20.04
@@ -178,7 +178,7 @@ jobs:
178178
uses: actions/cache@v2
179179
with:
180180
path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-javascript/client-analytics/dist
181-
key: ${{ runner.os }}-js-client-analytics-${{ hashFiles('yarn.lock') }}
181+
key: ${{ runner.os }}-js-client-analytics-${{ find -s clients/algoliasearch-client-javascript/client-analytics/dist -type f -exec sha1sum {} \; | sha1sum }}
182182

183183
client_java_search:
184184
runs-on: ubuntu-20.04
@@ -202,7 +202,7 @@ jobs:
202202
uses: actions/cache@v2
203203
with:
204204
path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-java-2/target
205-
key: ${{ runner.os }}-java-client-${{ hashFiles('**/pom.xml') }}
205+
key: ${{ runner.os }}-java-client-${{ find -s clients/algoliasearch-client-javascript/algoliasearch-client-java-2/target -type f -exec sha1sum {} \; | sha1sum }}
206206

207207
cts:
208208
runs-on: ubuntu-20.04

0 commit comments

Comments
 (0)