Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: merge Dockerfiles, fix XDebug crash, support PHP 8.3, disable XDebug by default #20

Merged
merged 4 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 20 additions & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,45 @@ name: Build PHP docker images
on:
push:
branches:
- master
- master
pull_request:
branches:
- master
- master
schedule:
- cron: '0 12 * * SUN' # every sunday
workflow_dispatch:

jobs:
lint:
name: Lint Dockerfile
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: hadolint/[email protected]

build:
name: PHP
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
php_version:
- '7.4'
- '8.0'
- '8.1'
- '8.2'

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: setup-buildx
uses: docker/setup-buildx-action@v2
with:
platforms: |
linux/amd64
linux/arm64
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/login-action@v3
with:
images: lephare/php
tags: |
type=raw,${{ matrix.php_version }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v4
uses: docker/bake-action@v4
with:
context: "{{defaultContext}}:${{ matrix.php_version }}"
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ steps.setup-buildx.outputs.platforms }}
cache-from: type=gha
cache-to: type=gha,mode=max
5 changes: 5 additions & 0 deletions .spells
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function hadolint() {
docker run --rm -i -v ./hadolint.yaml:/.config/hadolint.yaml hadolint/hadolint < Dockerfile
}

echo hadolint
64 changes: 0 additions & 64 deletions 7.4/Dockerfile

This file was deleted.

18 changes: 0 additions & 18 deletions 7.4/symfony.ini

This file was deleted.

65 changes: 0 additions & 65 deletions 8.0/Dockerfile

This file was deleted.

18 changes: 0 additions & 18 deletions 8.0/symfony.ini

This file was deleted.

81 changes: 0 additions & 81 deletions 8.0/symfony.pool.conf

This file was deleted.

Loading