bug fix for openai embedding model #25
Workflow file for this run
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: Deploy to PyPI and DockerHub | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+[a-zA-Z0-9]*' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine setuptools_scm | |
- name: Build and deploy to PyPI | |
run: | | |
python setup.py sdist bdist_wheel | |
twine upload dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Determine if pre-release | |
id: prerelease_check | |
run: | | |
if [[ ${{ github.ref_name }} =~ [a-zA-Z] ]]; then | |
echo "This is a pre-release version." | |
echo "::set-output name=tag_list::krohling/bondai:${{ github.ref_name }}" | |
else | |
echo "This is a stable release version." | |
echo "::set-output name=tag_list::krohling/bondai:${{ github.ref_name }},krohling/bondai:latest" | |
fi | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./docker | |
push: true | |
tags: ${{ steps.prerelease_check.outputs.tag_list }} | |
platforms: linux/amd64,linux/arm64 |