a better backend deployment workflow
This commit is contained in:
34
.gitea/workflows/workflow_deploy-container.yaml
Normal file
34
.gitea/workflows/workflow_deploy-container.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
overlay:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
KUBE_CONFIG:
|
||||
required: true
|
||||
|
||||
|
||||
name: Deploy the newly built container
|
||||
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: https://gitea.com/actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: setup kubectl
|
||||
uses: https://github.com/azure/setup-kubectl@v4
|
||||
|
||||
- name: Set kubeconfig
|
||||
run: |
|
||||
echo "${{ secrets.KUBE_CONFIG }}" > kubeconfig
|
||||
|
||||
- name: Deploy to k8s
|
||||
run: |
|
||||
kubectl apply -k backend/deployment/overlays/${{ inputs.overlay }} --kubeconfig=kubeconfig
|
Reference in New Issue
Block a user