v0.4-alpha.3 #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy TESTNET Seed | |
on: | |
workflow_dispatch: | |
release: | |
types: [ published ] | |
jobs: | |
deploy-rooch-testnet: | |
name: deploy rooch testnet | |
runs-on: self-hosted | |
steps: | |
- name: Extract version | |
id: extract-version | |
run: | | |
printf "::set-output name=%s::%s\n" tag-name "${GITHUB_REF#refs/tags/}" | |
- name: Deploy to GCP TESTNET VM | |
env: | |
PRIVATE_KEY: ${{ secrets.GCP_TESTNET_SSH_PRIVATE_KEY }} | |
HOST: ${{ secrets.GCP_TESTNET_VM_HOST }} | |
USER: ${{ secrets.GCP_TESTNET_VM_USER }} | |
run: | | |
echo "$PRIVATE_KEY" > private_key.pem | |
chmod 600 private_key.pem | |
sudo apt update | |
sudo apt install -y --no-install-recommends openssh-server | |
ssh -o StrictHostKeyChecking=no -i private_key.pem $USER@$HOST bash -c "'sleep 30' && docker ps | grep rooch | awk '{print \$1}' | xargs -r docker stop && docker ps -a | grep rooch | awk '{print \$1}' | xargs -r docker rm -f && docker pull 'ghcr.io/rooch-network/rooch:${{ steps.extract-version.outputs.tag-name }}' && docker run -d -v /data:/root -p 50051:50051 'ghcr.io/rooch-network/rooch:${{ steps.extract-version.outputs.tag-name }}' server start -n test --btc-rpc-url '${{secrets.BTC_TEST_RPC_URL}}' --btc-rpc-username rooch-test --btc-rpc-password '${{secrets.BTC_TEST_RPC_PWD}}' --btc-network 2 --da '{\"internal-da-server\": {\"servers\": [{\"open-da\": {\"scheme\": \"gcs\", \"config\": {\"bucket\": \"${{secrets.OPENDA_GCP_TESTNET_BUCKET}}\", \"credential\": \"${{secrets.OPENDA_GCP_TESTNET_CREDENTIAL}}\"}}}]}}'" | |