diff --git a/.gitea/workflows/deploy-k8s.yaml b/.gitea/workflows/deploy-k8s.yaml index 79bb710..a85d5bb 100644 --- a/.gitea/workflows/deploy-k8s.yaml +++ b/.gitea/workflows/deploy-k8s.yaml @@ -1,4 +1,4 @@ -name: dotnet-publish-nuget +name: dotnet-cicd-k8s on: [push] env: @@ -39,4 +39,14 @@ jobs: context: . platforms: linux/amd64 push: true - tags: registry.cn-guangzhou.aliyuncs.com/acme_nrop/dotnet-deploy-k8s:latest + tags: registry.cn-guangzhou.aliyuncs.com/acme_nrop/dotnet-deploy-k8s:${{gitea.sha}} + - name: deploy to cluster + uses: steebchen/kubectl@v2.0.0.0.0 + with: + config: ${{ secrets.KUBE_CONFIG_DATA }} + command: set image --record deployment/dotnet-cicd-k8s-sample container=dotnet-deploy-k8s:${{gitea.sha}} + - name: verify deployment + uses: steebchen/kubectl@v2.0.0 + with: + config: ${{ secrets.KUBE_CONFIG_DATA }} + command: rollout status deployment/dotnet-cicd-k8s-sample