Files
lpt-ai/.gitea/workflows/deploy.yml
T

32 lines
675 B
YAML

name: lpt-ai Build & Deploy
on:
workflow_dispatch:
inputs:
environment:
description: '部署环境'
required: true
type: choice
options:
- dev
- prod
env:
REGISTRY: 192.168.123.199:5000
APP: lpt-ai
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t $REGISTRY/$APP:${{ inputs.environment }} .
docker push $REGISTRY/$APP:${{ inputs.environment }}
- name: Deploy to K8s
run: |
kubectl rollout restart deployment/$APP -n lpt-${{ inputs.environment }}