Skip to content

Commit

Permalink
Merge pull request #35 from invariant-labs/add-vara-actions
Browse files Browse the repository at this point in the history
add vara actions
  • Loading branch information
zielvna authored Sep 18, 2024
2 parents 6c33788 + 9cbdc4c commit d1a718a
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 8 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,26 @@ jobs:
name: alph-snapshot-${{ github.run_id }}
path: |
./data/alph/
vara-snap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "20"
- name: vara snapshot
working-directory: ./vara
run: |
npm install
npm run snap
- uses: actions/upload-artifact@v4
with:
name: vara-snapshot-${{ github.run_id }}
path: |
./data/vara/
deploy:
needs: [a0-snap, alph-snap, svm-snap]
needs: [a0-snap, alph-snap, svm-snap, vara-snap]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
Expand All @@ -126,6 +143,11 @@ jobs:
with:
name: svm-snapshot-${{ github.run_id }}
path: ./data/
- name: Download vara snapshot
uses: actions/download-artifact@v4
with:
name: vara-snapshot-${{ github.run_id }}
path: ./data/vara/
continue-on-error: true
- name: Commit changes
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual-a0-snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
git config --global user.email [email protected]
git config --global user.name invariantStats
git add ./data/
git commit -m "Snapshots of data done!"
git commit -m "Aleph Zero snapshot of data done!"
- name: GitHub Push
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
branch: main
4 changes: 2 additions & 2 deletions .github/workflows/manual-alph-snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
git config --global user.email [email protected]
git config --global user.name invariantStats
git add ./data/
git commit -m "ALPH manual snapshot of data"
git commit -m "Alephium snapshot of data done!"
- name: GitHub Push
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
branch: main
4 changes: 2 additions & 2 deletions .github/workflows/manual-svm-snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ jobs:
git config --global user.email [email protected]
git config --global user.name invariantStats
git add ./data/
git commit -m "Snapshot of data done!"
git commit -m "SVM snapshot of data done!!"
- name: GitHub Push
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
branch: main
33 changes: 33 additions & 0 deletions .github/workflows/manual-vara-snap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Manual vara snap"

on: workflow_dispatch

jobs:
vara-snap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "20"
- name: vara snapshot
working-directory: ./vara
run: |
npm install
npm run snap
- uses: actions/upload-artifact@v4
with:
name: vara-snapshot-${{ github.run_id }}
path: |
./data/vara/
- name: Commit changes
run: |
git config --global user.email [email protected]
git config --global user.name invariantStats
git add ./data/
git commit -m "Vara Network snapshot of data done!"
- name: GitHub Push
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
3 changes: 2 additions & 1 deletion vara/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"snap": "sh ./snap.sh"
},
"keywords": [],
"author": "",
Expand Down

0 comments on commit d1a718a

Please sign in to comment.