fix(cicd): detect arch at runtime for Docker CLI and kubectl downloads
This commit is contained in:
parent
5769915d75
commit
a3ab330269
@ -25,7 +25,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Docker CLI
|
- name: Install Docker CLI
|
||||||
run: |
|
run: |
|
||||||
curl -fsSL https://download.docker.com/linux/static/stable/aarch64/docker-27.3.1.tgz \
|
ARCH=$(uname -m)
|
||||||
|
curl -fsSL "https://download.docker.com/linux/static/stable/${ARCH}/docker-27.3.1.tgz" \
|
||||||
| tar xzf - --strip-components=1 -C /usr/local/bin docker/docker
|
| tar xzf - --strip-components=1 -C /usr/local/bin docker/docker
|
||||||
|
|
||||||
- name: Login to Gitea registry
|
- name: Login to Gitea registry
|
||||||
@ -36,6 +37,7 @@ jobs:
|
|||||||
- name: Build and push finance-api
|
- name: Build and push finance-api
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
|
--platform linux/arm64 \
|
||||||
-t git.gugagr.xyz/admin/homelab_finance-api:${{ gitea.sha }} \
|
-t git.gugagr.xyz/admin/homelab_finance-api:${{ gitea.sha }} \
|
||||||
-f apps/finance/services/api/Dockerfile \
|
-f apps/finance/services/api/Dockerfile \
|
||||||
.
|
.
|
||||||
@ -43,9 +45,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Install kubectl
|
- name: Install kubectl
|
||||||
run: |
|
run: |
|
||||||
curl -sSLo kubectl \
|
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
|
||||||
https://dl.k8s.io/release/v1.30.0/bin/linux/arm64/kubectl
|
curl -sSLo /usr/local/bin/kubectl \
|
||||||
install -m 0755 kubectl /usr/local/bin/kubectl
|
"https://dl.k8s.io/release/v1.30.0/bin/linux/${ARCH}/kubectl"
|
||||||
|
chmod +x /usr/local/bin/kubectl
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user