-
Notifications
You must be signed in to change notification settings - Fork 19
57 lines (49 loc) · 1.62 KB
/
batch-deposit-withdraw.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Batch Deposit & Withdraw On Alphanet_v1
on:
workflow_dispatch:
schedule:
- cron: '0 */4 * * *' # runs every 4 hour
jobs:
check-secrets:
runs-on: ubuntu-latest
if: github.repository == 'godwokenrises/godwoken-tests'
outputs:
available: ${{ steps.check.outputs.available }}
steps:
- id: check
env:
KEY1: '${{ secrets.GODWOKEN_TEST_PRIVATE_KEY }}'
if: ${{ env.KEY1 != '' }}
run: echo "available=true" >> $GITHUB_OUTPUT
batch-deposit-and-withdraw:
runs-on: ubuntu-latest
needs: check-secrets
if: needs.check-secrets.outputs.available
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- uses: actions/github-script@v6
id: start-time
with:
script: return Date.now()
result-encoding: string
- name: Print start-time
run: echo "${{ steps.start-time.outputs.result }}"
- name: Setup Light-Godwoken-CLI
working-directory: scripts/light-godwoken-cli
run: ./init.sh
- name: Run batch-deposit-withdraw
working-directory: scripts/light-godwoken-cli
run: |
lgc batch-deposit-withdraw \
--private-key ${{ secrets.GODWOKEN_TEST_PRIVATE_KEY }} \
--start-time ${{ steps.start-time.outputs.result }} \
--duration 240 \
--network alphanet_v1
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
name: batch-deposit-withdraw
path: ${{ github.workspace }}/scripts/light-godwoken-cli/artifacts