Skip to content

Commit c32e7da

Browse files
committed
chore: replace ledger-db cache on push or cache miss.
Signed-off-by: KtorZ <[email protected]>
1 parent ce193c4 commit c32e7da

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/CI.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -195,27 +195,27 @@ jobs:
195195
# incompatible, it is necessary to bump the index below to invalidate
196196
# the cached ledger snapshots, and recompute them from the CBOR ones
197197
# (i.e. Full bootstrap below)
198-
key: ${{ runner.OS }}-ledger-cache-v2
198+
key: ${{ runner.OS }}-ledger-cache-v2-${{ steps.timestamp.outputs.value }}
199199
restore-keys: |
200200
${{ runner.OS }}-ledger-cache-v2
201201
202202
- name: Full bootstrap amaru
203-
if: steps.cache-ledger-db.outputs.cache-hit != 'true'
203+
if: steps.cache-ledger-db.outputs.cache-hit == ''
204204
run: |
205205
make bootstrap
206206
207-
- if: steps.cache-ledger-db.outputs.cache-hit != 'true'
208-
uses: actions/cache/save@v4
209-
with:
210-
path: ./ledger.db
211-
key: ${{ runner.OS }}-ledger-cache-v2
212-
213207
- name: Light bootstrap amaru
214-
if: steps.cache-ledger-db.outputs.cache-hit == 'true'
208+
if: steps.cache-ledger-db.outputs.cache-hit != ''
215209
run: |
216210
make import-headers
217211
make import-nonces
218212
213+
- uses: actions/cache/save@v4
214+
if: github.event_name == 'push' || steps.cache-ledger-db.outputs.cache-hit == ''
215+
with:
216+
path: ./ledger.db
217+
key: ${{ runner.OS }}-ledger-cache-v2-${{ steps.timestamp.outputs.value }}
218+
219219
- name: Run node
220220
timeout-minutes: 30
221221
shell: bash

0 commit comments

Comments
 (0)