Merge pull request #137 from svc-design/codex/fix-offline-package-k3s-installer-arm64.tar.gz
Fix k3s arm64 binary packaging
This commit is contained in:
commit
326500ea45
@ -76,7 +76,7 @@ jobs:
|
||||
needs: build-k3s-installer
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [amd64]
|
||||
arch: [amd64, arm64]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@ -91,7 +91,19 @@ jobs:
|
||||
cd test-dir
|
||||
tar -xzvf offline-package-k3s-installer-${{ matrix.arch }}.tar.gz
|
||||
|
||||
- name: Verify k3s binary arch
|
||||
run: |
|
||||
set -euo pipefail
|
||||
BIN="test-dir/k3s-offline-package/bin/k3s-${{ matrix.arch }}"
|
||||
file "$BIN"
|
||||
if [ "${{ matrix.arch }}" = "amd64" ]; then
|
||||
file "$BIN" | grep -q 'x86-64'
|
||||
else
|
||||
file "$BIN" | grep -q 'aarch64'
|
||||
fi
|
||||
|
||||
- name: Setup K3s and Test
|
||||
if: matrix.arch == 'amd64'
|
||||
run: |
|
||||
cd test-dir/k3s-offline-package
|
||||
bash install-server.sh
|
||||
|
||||
@ -285,7 +285,11 @@ rm -rf "${BASE_DIR}"
|
||||
mkdir -p "${BASE_DIR}/"{bin,images,cni-plugins,addons,registry/docker.io,registry/ghcr.io,install}
|
||||
|
||||
# 核心二进制
|
||||
download "${K3S_URL_BASE}/k3s" "${BASE_DIR}/bin/k3s-${ARCH}"
|
||||
K3S_BIN="k3s"
|
||||
if [[ "${ARCH}" != "amd64" ]]; then
|
||||
K3S_BIN="k3s-${ARCH}"
|
||||
fi
|
||||
download "${K3S_URL_BASE}/${K3S_BIN}" "${BASE_DIR}/bin/k3s-${ARCH}"
|
||||
chmod +x "${BASE_DIR}/bin/k3s-${ARCH}"
|
||||
|
||||
download "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl" "${BASE_DIR}/bin/kubectl-${ARCH}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user