mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-17 09:27:36 +00:00
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
|
name: bitcoin-regtest
|
||
|
description: Spawns a regtest Bitcoin daemon
|
||
|
|
||
|
inputs:
|
||
|
version:
|
||
|
description: "Version to download and run"
|
||
|
required: false
|
||
|
default: 24.0.1
|
||
|
|
||
|
runs:
|
||
|
using: "composite"
|
||
|
steps:
|
||
|
- name: Bitcoin Daemon Cache
|
||
|
id: cache-bitcoind
|
||
|
uses: actions/cache@v3
|
||
|
with:
|
||
|
path: bitcoind
|
||
|
key: bitcoind-${{ runner.os }}-${{ runner.arch }}-${{ inputs.version }}
|
||
|
|
||
|
- name: Download the Bitcoin Daemon
|
||
|
if: steps.cache-bitcoind.outputs.cache-hit != 'true'
|
||
|
shell: bash
|
||
|
run: |
|
||
|
RUNNER_OS=linux
|
||
|
RUNNER_ARCH=x86_64
|
||
|
|
||
|
BASE=bitcoin-${{ inputs.version }}
|
||
|
FILE=$BASE-$RUNNER_ARCH-$RUNNER_OS-gnu.tar.gz
|
||
|
wget https://bitcoincore.org/bin/bitcoin-core-${{ inputs.version }}/$FILE
|
||
|
tar xzvf $FILE
|
||
|
|
||
|
cd bitcoin-${{ inputs.version }}
|
||
|
sudo mv bin/* /bin && sudo mv lib/* /lib
|
||
|
|
||
|
- name: Bitcoin Regtest Daemon
|
||
|
shell: bash
|
||
|
run: |
|
||
|
RPC_USER=serai
|
||
|
RPC_PASS=seraidex
|
||
|
|
||
|
bitcoind -regtest -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS -daemon
|