ci: add kubectl setup step with secret

This commit is contained in:
2026-07-19 18:50:39 +08:00
parent a6dab438d5
commit 58e9e4db22
+8
View File
@@ -37,6 +37,14 @@ jobs:
docker push $REGISTRY/$APP:$TAG docker push $REGISTRY/$APP:$TAG
docker push $REGISTRY/$APP:${{ inputs.environment }} docker push $REGISTRY/$APP:${{ inputs.environment }}
- name: Setup kubectl
run: |
curl -sLO "https://dl.k8s.io/release/v1.36.0/bin/linux/amd64/kubectl"
chmod +x kubectl
mv kubectl /usr/local/bin/
mkdir -p ~/.kube
echo "${{ secrets.KUBECONFIG_B64 }}" | base64 -d > ~/.kube/config
- name: Deploy to K8s - name: Deploy to K8s
run: | run: |
TAG=${{ github.sha }} TAG=${{ github.sha }}