Skip to content

ci

ci #150

Workflow file for this run

name: ci
on:
push:
branches:
- 'main'
schedule:
- cron: 0 0 * * 0
jobs:
docker:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
path-and-tag:
- '8.3:latest'
- '8.3-ci:8.3-ci'
- '8.3:8.3'
- '8.3-frankenphp-bookworm:8.3-frankenphp-bookworm'
- '8.3-symfony:8.3-symfony'
- '8.2-ci:8.2-ci'
- '8.2:8.2'
- '8.2-frankenphp-bookworm:8.2-frankenphp-bookworm'
- '8.2-symfony:8.2-symfony'
- '8.1-ci:8.1-ci'
- '8.1:8.1'
- '8.1-symfony:8.1-symfony'
steps:
-
name: Prepare paths and tags
uses: winterjung/split@v2
id: split
with:
msg: ${{ matrix.path-and-tag }}
separator: ':'
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
context: ${{ steps.split.outputs._0 }}
platforms: linux/amd64,linux/arm64
tags: ${{ format('silarhi/php-apache:{0}', steps.split.outputs._1) }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max