From 944c5ebcd9c8327eee6d555ee104663fad65804d Mon Sep 17 00:00:00 2001 From: qfl <790872612@qq.com> Date: Fri, 17 May 2024 16:20:29 +0800 Subject: [PATCH] fixed ui build error and update ui build workflow (#63) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 乔风鳞 --- .github/workflows/release-ui.yml | 60 ++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 10 +----- flow-graph/Dockerfile | 1 - rill-flow-ui/Dockerfile | 2 -- 4 files changed, 61 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/release-ui.yml diff --git a/.github/workflows/release-ui.yml b/.github/workflows/release-ui.yml new file mode 100644 index 000000000..16895d499 --- /dev/null +++ b/.github/workflows/release-ui.yml @@ -0,0 +1,60 @@ +name: Release Rill Flow UI + +on: + push: + branches: + - main + paths-ignore: + - '*.md' + - 'docs/**' + - 'executors/**' + workflow_dispatch: + inputs: + releaseVersion: + description: "Define the release version" + required: true + default: "" + developmentVersion: + description: "Define the snapshot version" + required: true + default: "" +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + # 拉取源码 + - uses: actions/checkout@v3 + with: + token: ${{secrets.RELEASE_TOKEN}} + - name: Configure Git User + run: | + git config user.email "actions@github.com" + git config user.name "GitHub Actions" + - name: Verify Whether a Release is Ready + id: release + shell: bash + run: | + if [ "${{ github.event.inputs.releaseVersion }}" != "" ] && [ "${{ github.event.inputs.developmentVersion }}" != "" ]; then + echo "auto_release=true" >> $GITHUB_ENV + else + echo "auto_release=false" >> $GITHUB_ENV + fi + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push for UI to DockerHub + uses: docker/build-push-action@v5 + with: + push: true + context: . + file: ./rill-flow-ui/Dockerfile + platforms: linux/amd64,linux/arm64 + tags: ${{ github.event.inputs.releaseVersion != '' && format('weibocom/rill-flow-ui:latest,weibocom/rill-flow-ui:{0}',github.event.inputs.releaseVersion) || 'weibocom/rill-flow-ui:latest' }} + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17aeec909..54953a32d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,12 +91,4 @@ jobs: context: . file: ./docker/Dockerfile platforms: linux/amd64,linux/arm64 - tags: ${{ github.event.inputs.releaseVersion != '' && format('weibocom/rill-flow:latest,weibocom/rill-flow:{0}',github.event.inputs.releaseVersion) || 'weibocom/rill-flow:latest' }} - - name: Build and push for UI to DockerHub - uses: docker/build-push-action@v5 - with: - push: true - context: . - file: ./rill-flow-ui/Dockerfile - platforms: linux/amd64,linux/arm64 - tags: ${{ github.event.inputs.releaseVersion != '' && format('weibocom/rill-flow-ui:latest,weibocom/rill-flow-ui:{0}',github.event.inputs.releaseVersion) || 'weibocom/rill-flow-ui:latest' }} + tags: ${{ github.event.inputs.releaseVersion != '' && format('weibocom/rill-flow:latest,weibocom/rill-flow:{0}',github.event.inputs.releaseVersion) || 'weibocom/rill-flow:latest' }} \ No newline at end of file diff --git a/flow-graph/Dockerfile b/flow-graph/Dockerfile index 2a3cb14c3..acfc35594 100644 --- a/flow-graph/Dockerfile +++ b/flow-graph/Dockerfile @@ -3,7 +3,6 @@ FROM node:18.12.1-alpine as build-stage WORKDIR /data/flow-graph COPY . ./ -RUN npm config set registry https://registry.npm.taobao.org RUN npm cache clean --force RUN npm config set strict-ssl false diff --git a/rill-flow-ui/Dockerfile b/rill-flow-ui/Dockerfile index f661c3a42..63416cdc8 100644 --- a/rill-flow-ui/Dockerfile +++ b/rill-flow-ui/Dockerfile @@ -4,7 +4,6 @@ FROM node:18.12.1-alpine as build-stage WORKDIR /data/rill-flow-ui COPY ./rill-flow-ui/ ./ -RUN npm config set registry https://registry.npm.taobao.org RUN npm cache clean --force RUN npm config set strict-ssl false @@ -16,7 +15,6 @@ FROM node:18.12.1-alpine as build-submodule-stage WORKDIR /data/rill-flow-graph COPY ./flow-graph ./ -RUN npm config set registry https://registry.npm.taobao.org RUN npm cache clean --force RUN npm config set strict-ssl false