name: Weekly Docker Image Build on: schedule: - cron: '0 2 * * 0' workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Container Registry uses: docker/login-action@v3 with: registry: git.paucapo.com username: ${{ secrets.REGISTRY_USER }} password: ${{ secrets.REGISTRY_PASSWORD }} - name: Setup Docker Buildx run: | docker buildx create --use --platform=linux/arm64/v8,linux/amd64 --name multi-platform-builder docker buildx inspect --bootstrap - 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