refactor(statedb/genesis-verify): Enhance state mismatch debugging (#… #1360
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: Build Docker And Deploy Seed | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
release: | |
types: [ published ] | |
jobs: | |
build-rooch-docker: | |
name: Build Rooch Docker | |
runs-on: self-hosted | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
with: | |
submodules: recursive | |
- name: Docker meta | |
id: docker_meta | |
uses: crazy-max/ghaction-docker-meta@v1 | |
with: | |
images: ghcr.io/rooch-network/rooch | |
tag-sha: true # add git short SHA as Docker tag | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
driver: docker | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GIT_PACKAGE_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: docker/Dockerfile | |
push: true | |
tags: | | |
ghcr.io/rooch-network/rooch:${{ steps.docker_meta.outputs.version }} | |
ghcr.io/rooch-network/rooch:main | |
- name: Save Docker tag as artifact | |
run: echo "${{ steps.docker_meta.outputs.version }}" > docker_tag.txt | |
- name: Upload Docker tag artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: docker_tag | |
path: docker_tag.txt | |
build-debug-rooch-docker: | |
name: Build and Deploy Debug Rooch Docker | |
runs-on: self-hosted | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
with: | |
submodules: recursive | |
- name: Docker meta debug | |
id: docker_meta_debug | |
uses: crazy-max/ghaction-docker-meta@v1 | |
with: | |
images: ghcr.io/rooch-network/rooch | |
tag-sha: true # add git short SHA as Docker tag | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
driver: docker | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GIT_PACKAGE_TOKEN }} | |
- name: Build and push debug | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: docker/DockerfileDebug | |
push: true | |
tags: | | |
ghcr.io/rooch-network/rooch:${{ steps.docker_meta_debug.outputs.version }}_debug | |
ghcr.io/rooch-network/rooch:main_debug | |
- name: Deploy debug to GCP DEV VM | |
env: | |
PRIVATE_KEY: ${{ secrets.GCP_SSH_PRIVATE_KEY }} | |
HOST: ${{ secrets.GCP_VM_HOST }} | |
USER: ${{ secrets.GCP_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 image prune -a -f && docker ps | grep main_debug | awk '{print \$1}' | xargs -r docker stop && docker ps -a | grep main_debug | awk '{print \$1}' | xargs -r docker rm -f && docker pull 'ghcr.io/rooch-network/rooch:main_debug' && docker run --rm -v /root:/root ghcr.io/rooch-network/rooch:main_debug server clean -n dev -f && docker run -d -v /root:/root -p 6767:6767 -p 9184:9184 'ghcr.io/rooch-network/rooch:main_debug' server start -n dev --btc-rpc-url '${{secrets.BTC_REGTEST_RPC_URL}}' --btc-rpc-username rooch-regtest --btc-rpc-password '${{secrets.BTC_REGTEST_RPC_PWD}}' --da '{\"internal-da-server\": {\"servers\": [{\"open-da\": {\"scheme\": \"fs\"}}]}}'" | |
ssh -o StrictHostKeyChecking=no -i private_key.pem $USER@$HOST "cd /root/rooch && git pull origin main && bash scripts/check_dev_deploy_status.sh main_debug '${{ secrets.TESTNET_MNEMONIC_PHRASE }}'" |