Nightly Sync #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly Sync | |
on: | |
schedule: | |
- cron: '00 08,22 * * *' | |
workflow_dispatch: | |
inputs: | |
synchronization-level: | |
description: 'Desired % synchronization level. Between 0 and 1.' | |
required: false | |
default: 1 | |
type: number | |
jobs: | |
sync_and_cache: | |
strategy: | |
matrix: | |
network: [ preprod ] | |
ogmios_version: [ v6.11.2 ] | |
cardano_node_version: [ 10.1.4 ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ runner.temp }}/db-${{ matrix.network }} | |
key: cardano-node-ogmios-${{ matrix.network }} | |
restore-keys: | | |
cardano-node-ogmios-${{ matrix.network }} | |
- uses: CardanoSolutions/[email protected] | |
with: | |
db-dir: ${{ runner.temp }}/db-${{ matrix.network }} | |
network: ${{ matrix.network }} | |
version: ${{ matrix.ogmios_version }}_${{ matrix.cardano_node_version }} | |
synchronization-level: ${{ inputs.synchronization-level || 1 }} | |
# Remove old immutable chunks from the database, we don't need them and they make cache & on-disk system larger. | |
- name: prune node db | |
shell: bash | |
working-directory: ${{ runner.temp }}/db-${{ matrix.network }} | |
run: | | |
rm immutable/00*.chunk immutable/01*.chunk immutable/02*.chunk immutable/030*.chunk |