fix kubectl arch so can build on ARM.
Some checks failed
Build and Deploy to K3s / build-and-push (push) Successful in 34s
Build and Deploy to K3s / deploy (push) Failing after 6s

This commit is contained in:
jasonwitty 2025-11-28 12:32:21 -08:00
parent e2ddc721f2
commit eeb8c7f334

View File

@ -66,9 +66,18 @@ jobs:
- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
if ! command -v kubectl &> /dev/null; then
ARCH=$(uname -m)
if [ "$ARCH" = "aarch64" ]; then
ARCH="arm64"
elif [ "$ARCH" = "x86_64" ]; then
ARCH="amd64"
fi
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
fi
kubectl version --client
- name: Configure kubectl
run: |