From 3f997f46aa5cca6a15b77407eff0ba5f06034e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Cap=C3=B3?= Date: Sun, 10 Aug 2025 11:42:13 +0200 Subject: [PATCH] split in different steps --- .gitea/workflows/weekly-build.yml | 66 ++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/weekly-build.yml b/.gitea/workflows/weekly-build.yml index fd84bbb..e8c4792 100644 --- a/.gitea/workflows/weekly-build.yml +++ b/.gitea/workflows/weekly-build.yml @@ -1,4 +1,4 @@ -name: Weekly Docker Image Rebuild +name: Weekly Docker Image Build on: schedule: @@ -22,29 +22,57 @@ jobs: username: ${{ secrets.REGISTRY_USER }} password: ${{ secrets.REGISTRY_PASSWORD }} - - name: Build and push PHP images + - name: Setup Docker Buildx run: | - PHP_VERSIONS="7.4 8.0 8.1 8.2" - PLATFORMS="linux/arm64/v8,linux/amd64" - docker buildx create --use --platform=linux/arm64/v8,linux/amd64 --name multi-platform-builder docker buildx inspect --bootstrap - - for PHP_VERSION in ${PHP_VERSIONS}; do - echo "Building php:${PHP_VERSION}" - docker buildx build \ - --no-cache \ - --platform=${PLATFORMS} \ - --push \ - -f "./Dockerfile-php" \ - -t "git.paucapo.com/server/php:${PHP_VERSION}" \ - --build-arg PHP_VERSION=${PHP_VERSION} \ - . - done - - docker buildx rm multi-platform-builder --force + + - name: Build and push PHP 7.4 + run: | + docker buildx build \ + --no-cache \ + --platform=linux/arm64/v8,linux/amd64 \ + --push \ + -f "./Dockerfile-php" \ + -t "git.paucapo.com/server/php:7.4" \ + --build-arg PHP_VERSION=7.4 \ + . + + - name: Build and push PHP 8.0 + run: | + docker buildx build \ + --no-cache \ + --platform=linux/arm64/v8,linux/amd64 \ + --push \ + -f "./Dockerfile-php" \ + -t "git.paucapo.com/server/php:8.0" \ + --build-arg PHP_VERSION=8.0 \ + . + + - name: Build and push PHP 8.1 + run: | + docker buildx build \ + --no-cache \ + --platform=linux/arm64/v8,linux/amd64 \ + --push \ + -f "./Dockerfile-php" \ + -t "git.paucapo.com/server/php:8.1" \ + --build-arg PHP_VERSION=8.1 \ + . + + - name: Build and push PHP 8.2 + run: | + docker buildx build \ + --no-cache \ + --platform=linux/arm64/v8,linux/amd64 \ + --push \ + -f "./Dockerfile-php" \ + -t "git.paucapo.com/server/php:8.2" \ + --build-arg PHP_VERSION=8.2 \ + . - name: Cleanup if: always() run: | + docker buildx rm multi-platform-builder --force docker image prune -a --force \ No newline at end of file