mirror of
https://github.com/chialab/docker-php.git
synced 2026-08-24 02:24:16 -05:00
feat: add GH Actions workflow
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
name: Build, test and publish images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
|
||||
build-test-push:
|
||||
name: Build, test and publish
|
||||
runs-on: ubuntu-20.04
|
||||
if: "!contains(github.event.commits[0].message, 'skip ci')"
|
||||
strategy:
|
||||
matrix:
|
||||
version: [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4' ]
|
||||
flavor: [ '', '-apache', '-fpm' ]
|
||||
include:
|
||||
- version: 'latest'
|
||||
flavor: ''
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build images
|
||||
run: |
|
||||
make build VERSION=${VERSION}
|
||||
make -C dev build VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: "${{ matrix.version }}${{ matrix.flavor }}"
|
||||
|
||||
- name: Test images
|
||||
run: |
|
||||
make test VERSION=${VERSION}
|
||||
make -C dev test VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: "${{ matrix.version }}${{ matrix.flavor }}"
|
||||
|
||||
- name: Publish images
|
||||
if: "github.event_name != 'pull_request'"
|
||||
run: |
|
||||
make push VERSION=${VERSION}
|
||||
make -C dev push VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: "${{ matrix.version }}${{ matrix.flavor }}"
|
||||
Reference in New Issue
Block a user