Skip to content

Network Synchronization #2465

Network Synchronization

Network Synchronization #2465

name: Network Synchronization
on:
schedule:
- cron: '00 06,18 * * *'
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: [ preview ]
ogmios_version: [ v6.6.2 ]
cardano_node_version: [ 9.1.1 ]
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3.5.3
- name: ⌚ Get Date/Time
id: date-time
shell: bash
run: |
echo "timestamp=$(/bin/date -u '+%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT
- name: 💾 Cache cardano-node DB
id: cache
uses: actions/cache@v3.3.1
with:
path: ${{ runner.temp }}/db-${{ matrix.network }}
key: cardano-node-ogmios-${{ matrix.network }}-${{ steps.date-time.outputs.timestamp }}
restore-keys: |
cardano-node-ogmios-${{ matrix.network }}-
- name: ⟲ Sync Node
uses: CardanoSolutions/gh-action-cardano-node-ogmios-docker-sync@v1.1.0
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 }}