This commit is contained in:
2026-06-02 22:44:55 +08:00
parent 04fd9f8c0e
commit 9ee93bea60

View File

@@ -1,14 +1,13 @@
name: 自动部署
on:
push:
branches: [ master ]
branches: [ main ]
jobs:
部署应用:
runs-on: ubuntu-latest
steps:
- name: k8s部署
run: |
# 把当前项目目录挂载进runner容器在容器内部执行kubectl
docker cp . gitea-runner:/tmp/work
docker exec -w /tmp/work gitea-runner /usr/local/bin/kubectl apply -f k8s/
docker cp ./ gitea-runner:/tmp/work/
docker exec -w /tmp/work gitea-runner sh -c "/usr/local/bin/kubectl apply -f k8s/"
docker exec gitea-runner /usr/local/bin/kubectl rollout restart deployment admin-ui -n kubernetes-dashboard