Skip to content
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
135 changes: 0 additions & 135 deletions .github/workflows/ci.yml

This file was deleted.

121 changes: 121 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: 'Continuous Integration'

on:
pull_request:
push:
branches:
- 'main'
schedule:
- cron: '0 0 * * 0'

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Hadolint
uses: hadolint/hadolint-action@v3.5.0
with:
dockerfile: '*/Dockerfile'
recursive: true
failure-threshold: warning

build:
name: Build (${{ matrix.path }})
needs: [lint]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- path: '8.5'
tags: |
silarhi/php-apache:latest
silarhi/php-apache:8.5
- path: '8.5-ci'
tags: silarhi/php-apache:8.5-ci
- path: '8.5-frankenphp-alpine'
tags: silarhi/php-apache:8.5-frankenphp-alpine
- path: '8.5-frankenphp-bookworm'
tags: silarhi/php-apache:8.5-frankenphp-bookworm
- path: '8.5-symfony'
tags: silarhi/php-apache:8.5-symfony
- path: '8.4'
tags: silarhi/php-apache:8.4
- path: '8.4-ci'
tags: silarhi/php-apache:8.4-ci
- path: '8.4-frankenphp-alpine'
tags: silarhi/php-apache:8.4-frankenphp-alpine
- path: '8.4-frankenphp-bookworm'
tags: silarhi/php-apache:8.4-frankenphp-bookworm
- path: '8.4-symfony'
tags: silarhi/php-apache:8.4-symfony
- path: '8.3'
tags: silarhi/php-apache:8.3
- path: '8.3-ci'
tags: silarhi/php-apache:8.3-ci
- path: '8.3-frankenphp-alpine'
tags: silarhi/php-apache:8.3-frankenphp-alpine
- path: '8.3-frankenphp-bookworm'
tags: silarhi/php-apache:8.3-frankenphp-bookworm
- path: '8.3-symfony'
tags: silarhi/php-apache:8.3-symfony
- path: '8.2'
tags: silarhi/php-apache:8.2
- path: '8.2-ci'
tags: silarhi/php-apache:8.2-ci
- path: '8.2-frankenphp-alpine'
tags: silarhi/php-apache:8.2-frankenphp-alpine
- path: '8.2-frankenphp-bookworm'
tags: silarhi/php-apache:8.2-frankenphp-bookworm
- path: '8.2-symfony'
tags: silarhi/php-apache:8.2-symfony
- path: '8.1'
tags: silarhi/php-apache:8.1
- path: '8.1-ci'
tags: silarhi/php-apache:8.1-ci
- path: '8.1-symfony'
tags: silarhi/php-apache:8.1-symfony
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Check if path changed
if: github.event_name == 'pull_request'
id: changed
uses: tj-actions/changed-files@v47
with:
files: ${{ matrix.path }}/**
- name: Set up QEMU
if: github.event_name != 'pull_request' || steps.changed.outputs.any_changed == 'true'
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
if: github.event_name != 'pull_request' || steps.changed.outputs.any_changed == 'true'
uses: docker/setup-buildx-action@v4
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
if: github.event_name != 'pull_request' || steps.changed.outputs.any_changed == 'true'
uses: docker/build-push-action@v7
with:
context: ${{ matrix.path }}
platforms: linux/amd64,linux/arm64
tags: ${{ matrix.tags }}
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=gha
cache-to: type=gha,mode=max

ci-passed:
name: CI passed
needs: [lint, build]
if: always()
runs-on: ubuntu-latest
steps:
- name: Check that all required jobs succeeded
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Docker PHP Apache
[![ci](https://github.com/silarhi/docker-php/actions/workflows/ci.yml/badge.svg)](https://github.com/silarhi/docker-php/actions/workflows/ci.yml)
[![Continuous Integration](https://github.com/silarhi/docker-php/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/silarhi/docker-php/actions/workflows/continuous-integration.yml)

A Docker image for PHP apps based on Debian. Works with Apache and PHP from 5.6 to 8.5 and provide a Symfony variant.

Expand Down
Loading