Build architecture-specific images in CI
All checks were successful
Publish / Test, build, and push image (push) Successful in 13m43s

This commit is contained in:
V 2026-05-16 22:06:23 +01:00
parent c8bd5754ba
commit fc736aa06e
2 changed files with 29 additions and 6 deletions

View File

@ -49,13 +49,20 @@ jobs:
exit 1 exit 1
fi fi
echo "VERSION=$version" >> "$GITHUB_ENV" echo "VERSION=$version" >> "$GITHUB_ENV"
echo "IMAGE=k3crpi.jumpingcrab.com:5000/sabisan:$version" >> "$GITHUB_ENV" echo "IMAGE_AMD64=k3crpi.jumpingcrab.com:5000/sabisan_amd64:$version" >> "$GITHUB_ENV"
echo "IMAGE_ARM64=k3crpi.jumpingcrab.com:5000/sabisan_arm64:$version" >> "$GITHUB_ENV"
- name: Install Docker CLI - name: Install Docker CLI
run: | run: |
apt-get update apt-get update
apt-get install -y --no-install-recommends docker.io apt-get install -y --no-install-recommends ca-certificates curl docker.io
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
mkdir -p ~/.docker/cli-plugins
curl -fsSL \
https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-amd64 \
-o ~/.docker/cli-plugins/docker-buildx
chmod +x ~/.docker/cli-plugins/docker-buildx
docker buildx version
- name: Log in to registry - name: Log in to registry
run: | run: |
@ -63,8 +70,23 @@ jobs:
--username "${{ secrets.REGISTRY_USERNAME }}" \ --username "${{ secrets.REGISTRY_USERNAME }}" \
--password-stdin --password-stdin
- name: Build image - name: Create Buildx builder
run: docker build --pull --tag "$IMAGE" . run: docker buildx create --use --name sabisan-builder
- name: Push image - name: Build and push amd64 image
run: docker push "$IMAGE" run: |
docker buildx build \
--platform linux/amd64 \
--pull \
--tag "$IMAGE_AMD64" \
--push \
.
- name: Build and push arm64 image
run: |
docker buildx build \
--platform linux/arm64 \
--pull \
--tag "$IMAGE_ARM64" \
--push \
.

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
/.env /.env
/.env.* /.env.*
!/.env.example !/.env.example
infra/
data/*.db data/*.db
data/*.db-* data/*.db-*
data/uploads/* data/uploads/*