File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 55 - cron : ' 0 2 * * *' # 2 AM UTC daily
66 workflow_dispatch :
77 inputs :
8+ blocktank_server :
9+ description : Blocktank base URL
10+ required : true
11+ default : ' https://api.stag0.blocktank.to/blocktank/api/v2'
812 block_count :
913 description : Number of regtest blocks to mine
1014 required : true
1519 runs-on : ubuntu-latest
1620 env :
1721 BLOCK_COUNT : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.block_count || '1' }}
22+ BLOCKTANK_SERVER : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.blocktank_server || 'https://api.stag0.blocktank.to/blocktank/api/v2' }}
1823 steps :
19- - name : Validate block count
24+ - name : Validate params
2025 run : |
2126 if [[ -z "${BLOCK_COUNT}" ]]; then
2227 echo "BLOCK_COUNT is empty" >&2
@@ -30,11 +35,15 @@ jobs:
3035 echo "BLOCK_COUNT must be greater than zero" >&2
3136 exit 1
3237 fi
38+ if [[ -z "${BLOCKTANK_SERVER}" ]]; then
39+ echo "BLOCKTANK_SERVER is empty" >&2
40+ exit 1
41+ fi
3342 - name : Mine regtest blocks
3443 run : |
3544 echo "Mining ${BLOCK_COUNT} block(s) on regtest…"
3645 curl --fail --silent --show-error \
3746 -X POST \
38- https://api.stag0.blocktank.to/blocktank/api/v2/ regtest/chain/mine \
47+ "${BLOCKTANK_SERVER}/ regtest/chain/mine" \
3948 -H 'Content-Type: application/json' \
4049 -d "{\"count\": ${BLOCK_COUNT}}"
You can’t perform that action at this time.
0 commit comments