Skip to content

PHP

PHP #92

Workflow file for this run

name: PHP
on:
push:
branches: [ master ]
paths:
- 'php/**'
- '.github/workflows/php.yaml'
pull_request:
paths:
- 'php/**'
- '.github/workflows/php.yaml'
schedule:
- cron: '0 0 1,15 * *'
workflow_dispatch:
jobs:
build:
name: ${{ matrix.php }}-${{ matrix.type }}
runs-on: ubuntu-latest
strategy:
matrix:
php: ['5', '7.0', '7.1', '7.2', '7.3', '7.4', '7', '8.0', '8.1', '8.2']
type: [apache, cli, fpm]
steps:
- uses: actions/checkout@v2
- name: Build the image
run: |
cd php/${{ matrix.php }}/${{ matrix.type }}
docker build . --tag monsieurbiz/php:${{ matrix.php }}-${{ matrix.type }}
docker images
- name: Push the image
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master'
run: |
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
docker push monsieurbiz/php:${{ matrix.php }}-${{ matrix.type }}