Skip to content

Commit

Permalink
update refresh job to upload ledger to us datacenter (#1023)
Browse files Browse the repository at this point in the history
* update refresh job to upload ledger to us datacenter
* add ledger file download
  • Loading branch information
jgreat authored Nov 21, 2024
1 parent b749267 commit 4f589e9
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/refresh-ledger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
name: Refresh ledger

on:
workflow_dispatch: {}
schedule:
- cron: '0 0 * * *'

Expand Down Expand Up @@ -70,6 +71,9 @@ jobs:
mkdir -p "${MC_LEDGER_DB}"
mkdir -p "$(dirname "${MC_WALLET_DB}")"
# Download existing ledger db
curl -sSfL "https://mcdeveu1ledger.blob.core.windows.net/${MC_CHAIN_ID}/data.mdb" -o "${MC_LEDGER_DB}/data.mdb"
# Start full-service
./full-service &
Expand All @@ -87,9 +91,16 @@ jobs:
echo "full-service shutdown successfully"
- name: copy ledger data.mdb to Azure Blob Storage
- name: copy ledger data.mdb to Azure Blob Storage - westeurope
env:
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.LEDGER_DB_WESTEUROPE_AZURE_STORAGE_CONNECTION_STRING }}
run: |
cd "${DOWNLOAD_DIR}/ledger"
az storage blob upload -f ./data.mdb -c ${{ matrix.network.chain_id }} -n data.mdb --overwrite
- name: copy ledger data.mdb to Azure Blob Storage - centralus
env:
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.LEDGER_DB_AZURE_STORAGE_CONNECTION_STRING }}
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.LEDGER_DB_CENTRALUS_AZURE_STORAGE_CONNECTION_STRING }}
run: |
cd "${DOWNLOAD_DIR}/ledger"
az storage blob upload -f ./data.mdb -c ${{ matrix.network.chain_id }} -n data.mdb --overwrite

0 comments on commit 4f589e9

Please sign in to comment.