Build architecture-specific images in CI
All checks were successful
Publish / Test, build, and push image (push) Successful in 13m43s
All checks were successful
Publish / Test, build, and push image (push) Successful in 13m43s
This commit is contained in:
parent
c8bd5754ba
commit
fc736aa06e
@ -49,13 +49,20 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
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
|
||||
run: |
|
||||
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/*
|
||||
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
|
||||
run: |
|
||||
@ -63,8 +70,23 @@ jobs:
|
||||
--username "${{ secrets.REGISTRY_USERNAME }}" \
|
||||
--password-stdin
|
||||
|
||||
- name: Build image
|
||||
run: docker build --pull --tag "$IMAGE" .
|
||||
- name: Create Buildx builder
|
||||
run: docker buildx create --use --name sabisan-builder
|
||||
|
||||
- name: Push image
|
||||
run: docker push "$IMAGE"
|
||||
- name: Build and push amd64 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
1
.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
/.env
|
||||
/.env.*
|
||||
!/.env.example
|
||||
infra/
|
||||
data/*.db
|
||||
data/*.db-*
|
||||
data/uploads/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user