Daily Seed Synchronization Check #82
Workflow file for this run
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: Daily Seed Synchronization Check | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 1,4" # At 00:00 on Monday, and Thursday | |
concurrency: | |
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
parse-mainnet-seed-list: | |
runs-on: minafoundation-default-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 | |
test-peer: | |
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 \ | |
--entrypoint="" \ | |
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: exit 1 && ./scripts/mina-sync-monitor.sh | |
- name: Record Job Result to File | |
if: ${{ failure() }} | |
run: | | |
echo "${{ matrix.seed }}: FAILED" >> $GITHUB_WORKSPACE/failed_seeds.txt | |
print-failed-seeds: | |
needs: test-peer | |
runs-on: minafoundation-default-runners | |
steps: | |
- name: Print Failed Seeds | |
run: | | |
echo "Failed Seed List:" | |
if [ -f $GITHUB_WORKSPACE/failed_seeds.txt ]; then | |
cat $GITHUB_WORKSPACE/failed_seeds.txt | |
else | |
echo "No failures." | |
fi | |
# send-slack-notification: | |
# needs: test-peer | |
# runs-on: minafoundation-default-runners | |
# steps: | |
# - name: Post to a Slack channel | |
# id: slack | |
# if: ${{ failure() }} | |
# uses: slackapi/[email protected] | |
# with: | |
# channel-id: "mf-alerts-info" | |
# slack-message: "Failed to synchronize with Mina Daemon using seed peer:\n *_${{ matrix.seed }}_*" | |
# env: | |
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |