feat: add deployment workflow and trigger in build.yaml

- Introduced a new deploy.yaml workflow for production deployment.
- Updated build.yaml to trigger the deployment workflow after building the Docker image.
This commit is contained in:
typist
2025-10-28 22:04:46 +08:00
parent 28a86dcbff
commit a6d9c23179
2 changed files with 90 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ jobs:
type=raw,value=latest,enable=${{ !contains(github.ref, 'snapshot') && !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') }}
- name: 构建并推送 Docker 镜像
id: build
uses: docker/build-push-action@v5
with:
context: .
@@ -46,4 +47,11 @@ jobs:
cache-to: type=registry,ref=${{ secrets.REGISTRY_ENDPOINT }}/${{ github.repository_owner }}/litek:buildcache,mode=max
# platforms: linux/amd64,linux/arm64
platforms: linux/amd64
- name: 触发部署 workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: deploy.yaml
token: ${{ secrets.GITHUB_TOKEN }}
inputs: '{"image_tag": "${{ github.ref_name }}"}'