数据查询页面支持多项目数据模型选择 #108
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: ERD Online to docker | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
TAG: 5.0.0 | |
steps: | |
# 步骤名称 | |
- name: checkout code | |
uses: actions/checkout@v3 | |
- name: actions/setup-node@v3 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '14.20' | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install Dependencies | |
run: yarn | |
- run: ./build.sh | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v1 # 三方的action操作, 执行docker login | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} # 配置dockerhub的认证,在Github项目主页 【Settings】 -> 【Secrets】 添加对应变量 | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build Image | |
run: | | |
docker buildx create --name mybuilder --driver docker-container --use | |
docker buildx build --platform linux/arm64,linux/amd64 -t erdonline/erd-ui:latest -f ci/Dockerfile . --push | |
docker buildx build --platform linux/arm64,linux/amd64 -t erdonline/erd-ui:${{ env.TAG }} -f ci/Dockerfile . --push | |
# - name: copy file via ssh key | |
# uses: appleboy/scp-action@master | |
# with: | |
# #需要部署的文件地址 | |
# source: 'dist/*' | |
# strip_components: 1 | |
# # SSH address 服务器地址 | |
# host: ${{ secrets.ERD_VM_HOST }} | |
# # Remote dir path 服务器下部署文件存放路径 | |
# target: ${{ secrets.ERD_VM_REMOTE_PATH }} | |
# # SSH Port 服务器端口 | |
# port: ${{ secrets.ERD_VM_PORT }} | |
# # SSH User name 用户名 | |
# username: ${{ secrets.ERD_VM_HOST_USERNAME }} | |
# # SSH User password 用户密码 | |
# # password: ${{ secrets.PASSWORD }} | |
# # key 密匙 | |
# key: ${{ secrets.ERD_VM_SSH }} |