Skip to content

feat: 添加对 finish_reason 的判断 #45

feat: 添加对 finish_reason 的判断

feat: 添加对 finish_reason 的判断 #45

name: Build and Push Dev Docker Image
on:
workflow_dispatch:
push:
branches:
- dev
paths-ignore:
- 'README.MD'
- 'docker-compose.yml'
- '.github/**'
- 'vercel.json'
- '.gitignore'
jobs:
semantic-release:
runs-on: ubuntu-latest
outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Git Configuration
run: |
git config --global user.name "iidamie"
git config --global user.email "iidamie@users.noreply.github.com"
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v4
with:
extra_plugins: |
@semantic-release/exec
@semantic-release/git
@semantic-release/changelog
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
build-and-push:
needs: semantic-release
runs-on: ubuntu-latest
if: ${{ needs.semantic-release.outputs.new_release_published == 'true' }}
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Read the version from version.txt
id: get_version
run: |
version=$(cat version.txt)
echo "Current version: v$version"
echo "::set-output name=version::v$version"
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: |
iidamie/deepseek2api:${{ steps.get_version.outputs.version }}
iidamie/deepseek2api:dev
platforms: linux/amd64,linux/arm64
build-args: TARGETPLATFORM=${{ matrix.platform }}