Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Build and Publish

Build and Publish #742

Workflow file for this run

name: Build and Publish
on:
workflow_dispatch:
push:
branches: [ master ]
schedule:
- cron: '4 2 * * *'
jobs:
build-and-push-docker-image:
name: Build Docker image and push to repositories
runs-on: ubuntu-latest
continue-on-error: true
strategy:
max-parallel: 10
matrix:
include:
- version: '8.3'
tag: '8.3'
xdebug_ext: 'xdebug-^3.3'
xdebug_file: 'config/xdebug3.ini'
phpunit_ver: '8,9,10,11'
- version: '8.2'
xdebug_ext: 'xdebug-^3.2'
xdebug_file: 'config/xdebug3.ini'
phpunit_ver: '8,9,10,11'
- version: '8.1'
xdebug_ext: 'xdebug-^3.2'
xdebug_file: 'config/xdebug3.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '8,9,10'
- version: '8.0'
xdebug_ext: 'xdebug-^3.2'
xdebug_file: 'config/xdebug3.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '8,9'
- version: '7.4'
xdebug_ext: 'xdebug-^3.1'
xdebug_file: 'config/xdebug3.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '8,9'
- version: '7.3'
xdebug_ext: 'xdebug-^3.1'
xdebug_file: 'config/xdebug3.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '7,8,9'
- version: '7.2'
xdebug_ext: 'xdebug-^3.1'
xdebug_file: 'config/xdebug3.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '6,7,8'
- version: '7.1'
xdebug_ext: 'xdebug-^2.9'
xdebug_file: 'config/xdebug2.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '5,6,7'
- version: '7.0'
xdebug_ext: 'xdebug-^2.7'
xdebug_file: 'config/xdebug2.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '5,6'
use_archive: 1
- version: '5.6'
xdebug_ext: 'xdebug-^2.5'
xdebug_file: 'config/xdebug2.ini'
extensions: 'mcrypt-stable'
phpunit_ver: '4,5'
use_archive: 1
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
tags: gander/dev:${{ matrix.tag || matrix.version }}
push: true
build-args: |
PHP_VERSION=${{ matrix.version }}
XDEBUG_EXTENSION=${{ matrix.xdebug_ext }}
XDEBUG_FILE=${{ matrix.xdebug_file }}
PHP_EXTENSIONS_ADD=${{ matrix.extensions }}
PHPUNIT_VERSIONS=${{ matrix.phpunit_ver }}
USE_ARCHIVE=${{ matrix.use_archive || 0 }}