Skip to content

feat: Init sudt backend by kuai init (#457) #51

feat: Init sudt backend by kuai init (#457)

feat: Init sudt backend by kuai init (#457) #51

Workflow file for this run

name: Deploy
on:
push:
branches:
- 'develop'
paths:
- 'packages/samples/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v3
with:
node-version: 18
- name: restore lerna
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install project dependencies and build
run: npm i
- name: Build packages
run: npm run build
- name: Get GitHub organization or user
run: echo 'ORG='$(echo $(dirname ${GITHUB_REPOSITORY}) | awk '{print tolower($0)}' | tr -d - ) >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: docker/mvp-dapp/Dockerfile
pull: true
push: true
tags: ${{ env.ORG }}/kuai-mvp-dapp:latest
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
redeploy:
name: Redeploy webhook call
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Deploy docker container webhook
uses: joelwmale/webhook-action@master
env:
WEBHOOK_URL: ${{ secrets.DEPLOY_WEBHOOK_URL }}