ci: use kubeconfig of service account (#8060)

This commit is contained in:
ᴊᴏᴇ ᴄʜᴇɴ
2025-11-25 19:07:24 -05:00
committed by GitHub
parent 3488e22a40
commit 994b769d9d

View File

@@ -96,14 +96,15 @@ jobs:
permissions:
contents: read
steps:
- name: Install doctl
uses: digitalocean/action-doctl@135ac0aa0eed4437d547c6f12c364d3006b42824 # v2.5.1
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Configure kubectl
run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_K8S_CLUSTER_ID }}
run: |
mkdir -p ~/.kube
echo "${KUBECONFIG}" | base64 -d > ~/.kube/config
env:
KUBECONFIG: ${{ secrets.DIGITALOCEAN_K8S_CLUSTER_KUBECONFIG }}
- name: Restart gogs-demo deployment
run: |
set -e
kubectl rollout restart deployment gogs-demo -n gogs
kubectl rollout status deployment gogs-demo -n gogs
- name: Send email on failure