feat: docker actions and fix can not use python -m build bug (#422)

- add docker actions (you need add the secret to the repo
- fix can not use `python -m build` for release -> (which actions
release use)
This commit is contained in:
Aries-ckt 2023-08-11 11:30:20 +08:00 committed by GitHub
commit 85344e8c23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 2 deletions

View File

@ -11,15 +11,14 @@ name: Upload Python Package
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
@ -37,3 +36,26 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
build-image:
runs-on: ubuntu-latest
needs: deploy
# run unless event type is pull_request
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: eosphorosai/dbgpt:${{ github.ref_name }}

3
MANIFEST.in Normal file
View File

@ -0,0 +1,3 @@
include README.md
include LICENSE
include requirements.txt