Files
laravel-php-fpm/.github/workflows/build.yml
T
jkaninda 16f5e551d2
Build / docker (8.1, alpine) (push) Canceled after 0s
Build / docker (8.1, debian) (push) Canceled after 0s
Build / docker (8.2, alpine) (push) Canceled after 0s
Build / docker (8.2, debian) (push) Canceled after 0s
Build / docker (8.3, alpine) (push) Canceled after 0s
Build / docker (8.3, debian) (push) Canceled after 0s
Build / docker (8.4, alpine) (push) Canceled after 0s
Build / docker (8.4, debian) (push) Canceled after 0s
Build / docker (8.5, alpine) (push) Canceled after 0s
Build / docker (8.5, debian) (push) Canceled after 0s
Build / legacy (7.2) (push) Canceled after 0s
Build / legacy (7.3) (push) Canceled after 0s
Build / legacy (7.4) (push) Canceled after 0s
Tests / integration (8.3, debian) (push) Canceled after 0s
Build / legacy (8.0) (push) Canceled after 0s
Tests / integration (8.1, alpine) (push) Canceled after 0s
Tests / integration (8.1, debian) (push) Canceled after 0s
Tests / integration (8.2, alpine) (push) Canceled after 0s
Tests / integration (8.2, debian) (push) Canceled after 0s
Tests / integration (8.3, alpine) (push) Canceled after 0s
Tests / integration (8.4, alpine) (push) Canceled after 0s
Tests / integration (8.4, debian) (push) Canceled after 0s
Tests / integration (8.5, alpine) (push) Canceled after 0s
Tests / integration (8.5, debian) (push) Canceled after 0s
Merge pull request #93 from jkaninda/dependabot/github_actions/docker/setup-qemu-action-4
Bump docker/setup-qemu-action from 3 to 4
2026-10-21 23:03:49 +02:00

88 lines
2.7 KiB
YAML

name: Build
on:
push:
branches:
- master
workflow_dispatch:
inputs:
legacy:
description: 'Also build legacy images (7.2, 7.3, 7.4, 8.0)'
required: false
default: false
type: boolean
env:
LATEST_PHP: "8.5"
jobs:
docker:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3", "8.4", "8.5"]
variant: ["debian", "alpine"]
steps:
- uses: actions/checkout@v7
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Compute tags
id: meta
run: |
image="${{ vars.BUILDKIT_IMAGE }}"
if [ "${{ matrix.variant }}" = "alpine" ]; then
file=./src/docker/Dockerfile.alpine
tags="${image}:${{ matrix.php }}-alpine"
[ "${{ matrix.php }}" = "${LATEST_PHP}" ] && tags="${tags},${image}:alpine"
else
file=./src/docker/Dockerfile
tags="${image}:${{ matrix.php }}"
[ "${{ matrix.php }}" = "${LATEST_PHP}" ] && tags="${tags},${image}:latest"
fi
echo "file=${file}" >> "$GITHUB_OUTPUT"
echo "tags=${tags}" >> "$GITHUB_OUTPUT"
- name: Build and push ${{ matrix.php }} ${{ matrix.variant }}
uses: docker/build-push-action@v6
with:
context: .
file: ${{ steps.meta.outputs.file }}
push: true
pull: true
platforms: linux/amd64,linux/arm64
build-args: |
phpVersion=${{ matrix.php }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha,scope=${{ matrix.php }}-${{ matrix.variant }}
cache-to: type=gha,mode=max,scope=${{ matrix.php }}-${{ matrix.variant }}
legacy:
if: ${{ github.event_name == 'workflow_dispatch' && inputs.legacy }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ["7.2", "7.3", "7.4", "8.0"]
steps:
- uses: actions/checkout@v7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push ${{ matrix.php }}
uses: docker/build-push-action@v6
with:
context: .
file: ./src/docker/${{ matrix.php }}/Dockerfile
push: true
tags: ${{ vars.BUILDKIT_IMAGE }}:${{ matrix.php }}