Skip to content

PM-1764 - Add daily Seed Synchronisation Check #27

PM-1764 - Add daily Seed Synchronisation Check

PM-1764 - Add daily Seed Synchronisation Check #27

Workflow file for this run

name: Daily Seed Synchronization Check
on:
push:
branches: [PM-1764-create-daily-seed-synchronisation-check]
jobs:
parse-mainnet-seed-list:
runs-on: minafoundation-xlarge-runners
outputs:
seeds: ${{ steps.parse-mainnet-seed-list.outputs.seeds }}
steps:
- name: 📥 Checkout
uses: actions/[email protected]
- name: Parse Mainnet Seed List
id: parse-mainnet-seed-list
run: |
echo "Parsing Mainnet Seed List"
seeds=$(cat networks/mainnet.txt | jq -R -s -c 'split("\n") | map(select(. != ""))')
echo "seeds=$seeds" >> $GITHUB_OUTPUT
check-synchronization:
needs: parse-mainnet-seed-list
runs-on: minafoundation-xlarge-runners
if: needs.parse-mainnet-seed-list.outputs.seeds != '[]' && needs.parse-mainnet-seed-list.outputs.seeds != ''
continue-on-error: true
strategy:
matrix:
seed: ${{ fromJson(needs.parse-mainnet-seed-list.outputs.seeds) }}
steps:
- name: 📥 Checkout
uses: actions/[email protected]
- name: Start Mina Daemon
run: |
docker run -d --restart always --name mina \
minaprotocol/mina-daemon:3.0.0-93e0279-bullseye-mainnet \
mina daemon \
--peer ${{ matrix.seed }}
- name: Wait for Daemon to Sync
id: wait-for-sync
run: ./scripts/mina-sync-monitor.sh
- name: Post to a Slack channel
id: slack
if: steps.wait-for-sync.conclusion == 'failure'
uses: slackapi/[email protected]
with:
channel-id: 'test-slack-api'
slack-message: "Unable to sync a Mina Node using ${{ matrix.seed }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}