Skip to content

Instantly share code, notes, and snippets.

@ries9112
Created July 15, 2021 12:37
Show Gist options
  • Save ries9112/04fbc78c1ef868d3966865ac0e660002 to your computer and use it in GitHub Desktop.
Save ries9112/04fbc78c1ef868d3966865ac0e660002 to your computer and use it in GitHub Desktop.
arweave CV backups GithubActions
name: Automated Backups Cryptovoxels
on:
schedule:
- cron: '0 10 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: npm install
run: |
npm install -g @textury/arkb
- name: Run Backups
run: |
echo "Downloading map info..." ;
curl -s 'https://www.cryptovoxels.com/api/parcels.json' > CryptoVoxelsArchive/parcels.json ;
curl -s 'https://www.cryptovoxels.com/api/suburbs.json' > CryptoVoxelsArchive/suburbs.json ;
curl -s 'https://www.cryptovoxels.com/api/islands.json' > CryptoVoxelsArchive/islands.json ;
cat CryptoVoxelsArchive/parcels.json | jq '.parcels | .[] | .id' | while read id ;
do
echo "Downloading land parcel info $id..."
curl -s "https://www.cryptovoxels.com/grid/parcels/$id" > CryptoVoxelsArchive/parcels/$id.json
done
echo "Creating zip." ;
zip -r -q CryptoVoxels-latest-archive.zip CryptoVoxelsArchive ;
echo "Deploying archive to Arweave." ;
arkb deploy CryptoVoxels-latest-archive.zip --auto-confirm --wallet [ENTER YOUR ARWEAVE-KEYFILE FILEPATH HERE] --tag.Tag-Name=CryptoVoxelsArchive ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment