feat: add GH Actions workflow

This commit is contained in:
leo
2021-01-31 18:51:08 +01:00
parent 48dd3cbc49
commit 9d7ba28422
+46
View File
@@ -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 }}"