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:
@@ -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 }}"}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user