diff --git a/.gitea/workflows/cicd.yaml b/.gitea/workflows/cicd.yaml index 8b50574..d7efae0 100644 --- a/.gitea/workflows/cicd.yaml +++ b/.gitea/workflows/cicd.yaml @@ -65,6 +65,22 @@ jobs: exit 1 fi + # The runner's job image ships docker but not kubectl/helm, so install + # them at job start (static binaries, linux/amd64). + - name: Install kubectl & helm + run: | + if ! command -v kubectl >/dev/null 2>&1; then + KVER=$(curl -sfL https://dl.k8s.io/release/stable.txt) + curl -sfL -o /usr/local/bin/kubectl "https://dl.k8s.io/release/${KVER}/bin/linux/amd64/kubectl" + chmod +x /usr/local/bin/kubectl + fi + if ! command -v helm >/dev/null 2>&1; then + curl -sfL https://get.helm.sh/helm-v3.16.4-linux-amd64.tar.gz | tar xz -C /tmp + mv /tmp/linux-amd64/helm /usr/local/bin/helm + fi + kubectl version --client + helm version + - name: Set up kubeconfig run: | echo "KUBECONFIG=${RUNNER_TEMP}/kubeconfig" >> "$GITHUB_ENV"