-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update bisheng_langchain && deploy (#14)
- Loading branch information
Showing
76 changed files
with
2,076 additions
and
1,982 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
|
||
name: release | ||
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
branches: | ||
- "release" | ||
|
||
env: | ||
DOCKERHUB_REPO: dataelement/ | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
#if: startsWith(github.event.ref, 'refs/tags') | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get version | ||
id: get_version | ||
run: | | ||
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
# 构建 backend 并推送到 Docker hub | ||
- name: Build backend and push | ||
id: docker_build_backend | ||
uses: docker/build-push-action@v2 | ||
with: | ||
# backend 的context目录 | ||
context: "./src/backend/" | ||
# 是否 docker push | ||
push: false | ||
# docker build arg, 注入 APP_NAME/APP_VERSION | ||
build-args: | | ||
APP_NAME="bisheng-backend" | ||
APP_VERSION=${{ steps.get_version.outputs.VERSION }} | ||
# 生成两个 docker tag: ${APP_VERSION} 和 latest | ||
tags: | | ||
${{ env.DOCKERHUB_REPO }}bisheng-backend:latest | ||
${{ env.DOCKERHUB_REPO }}bisheng-backend:${{ steps.get_version.outputs.VERSION }} | ||
# 构建 Docker frontend 并推送到 Docker hub | ||
- name: Build frontend and push | ||
id: docker_build_frontend | ||
uses: docker/build-push-action@v2 | ||
with: | ||
# frontend 的context目录 | ||
context: "./src/frontend/" | ||
# 是否 docker push | ||
push: false | ||
# docker build arg, 注入 APP_NAME/APP_VERSION | ||
build-args: | | ||
APP_NAME="bisheng-frontend" | ||
APP_VERSION=${{ steps.get_version.outputs.VERSION }} | ||
# 生成两个 docker tag: ${APP_VERSION} 和 latest | ||
tags: | | ||
${{ env.DOCKERHUB_REPO }}bisheng-frontend:latest | ||
${{ env.DOCKERHUB_REPO }}bisheng-frontend:${{ steps.get_version.outputs.VERSION }} | ||
# 构建 bisheng-langchain | ||
- name: Set python version 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Build PyPi bisheng-langchain and push | ||
id: pypi_build_bisheng_langchain | ||
run: | | ||
pip install Cython | ||
pip install wheel | ||
pip install twine | ||
cd ./src/bisheng-langchain | ||
python setup.py bdist_wheel | ||
repo="http://110.16.193.170:50083/repository/pypi-hosted/" | ||
twine upload --verbose -u ${{ secrets.NEXUS_USER }} -p ${{ secrets.NEXUS_PASSWORD }} --repository-url $repo dist/*.whl |
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
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
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
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
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
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
Oops, something went wrong.