This commit is contained in:
+30
-19
@@ -12,30 +12,41 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx with more CPUs
|
- name: Set up Docker Buildx
|
||||||
run: |
|
uses: docker/setup-buildx-action@v3
|
||||||
docker buildx create --use --name custom-builder \
|
with:
|
||||||
--driver docker-container \
|
driver: docker-container
|
||||||
--driver-opt image=moby/buildkit:latest \
|
use: true
|
||||||
--driver-opt network=host
|
buildkitd-flags: --allow-insecure-entitlement network.host
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Boost BuildKit CPU (4 cores)
|
||||||
|
run: |
|
||||||
|
CONTAINER_ID=$(docker ps --filter "name=buildx_buildkit" --format "{{.ID}}")
|
||||||
|
if [ -n "$CONTAINER_ID" ]; then
|
||||||
|
echo "Patching BuildKit container: $CONTAINER_ID with 40 CPUs"
|
||||||
|
docker update --cpus=40 "$CONTAINER_ID"
|
||||||
|
docker restart "$CONTAINER_ID"
|
||||||
|
else
|
||||||
|
echo "BuildKit container not found!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Set up QEMU for cross-platform builds
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
with:
|
with:
|
||||||
platforms: all
|
platforms: all
|
||||||
|
|
||||||
- name: Build and push database image (arm64 + amd64)
|
- name: Build and push database image (arm64 + amd64)
|
||||||
run: |
|
uses: docker/build-push-action@v5
|
||||||
docker buildx build \
|
with:
|
||||||
--platform linux/amd64,linux/arm64 \
|
context: ./database
|
||||||
-t docker.mistox.net/mistox-sql \
|
platforms: linux/amd64,linux/arm64
|
||||||
--push \
|
push: true
|
||||||
./database
|
tags: docker.mistox.net/mistox-sql:latest
|
||||||
|
|
||||||
- name: Build and push website image (arm64 + amd64)
|
- name: Build and push website image (arm64 + amd64)
|
||||||
run: |
|
uses: docker/build-push-action@v5
|
||||||
docker buildx build \
|
with:
|
||||||
--platform linux/amd64,linux/arm64 \
|
context: .
|
||||||
-t docker.mistox.net/mistox-website \
|
platforms: linux/amd64,linux/arm64
|
||||||
--push \
|
push: true
|
||||||
.
|
tags: docker.mistox.net/mistox-website:latest
|
||||||
Reference in New Issue
Block a user