Skip to content

legacy ci

legacy ci #353

name: legacy ci
on:
schedule:
- cron: '0 10 * * *' # every day at 10am
push:
branches:
- 'main'
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
strategy:
matrix:
php: [ "7.2", "7.3", "7.4", "8.0", "8.1", "8.2" ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker Image Update Checker
id: baseupdatecheck
uses: lucacome/[email protected]
with:
base-image: "thecodingmachine/php:${{ matrix.php }}-v4-slim-cli"
image: "kellerkinder/pipeline-image:${{ matrix.php }}"
continue-on-error: true
- name: Set up QEMU
uses: docker/[email protected]
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' || steps.baseupdatecheck.outputs.needs-updating == 'true' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' || steps.baseupdatecheck.outputs.needs-updating == 'true' }}
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' || steps.baseupdatecheck.outputs.needs-updating == 'true' }}
- name: Build
id: docker_build
uses: docker/[email protected]
with:
context: .
push: true
tags: "localhost:5000/kellerkinder/pipeline-image:${{ matrix.php }}"
build-args: |
PHP_VERSION=${{ matrix.php }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' || steps.baseupdatecheck.outputs.needs-updating == 'true' }}
- name: Test
run: |
docker buildx imagetools inspect localhost:5000/kellerkinder/pipeline-image:${{ matrix.php }}
docker run --rm localhost:5000/kellerkinder/pipeline-image:${{ matrix.php }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' || steps.baseupdatecheck.outputs.needs-updating == 'true' }}
- name: Push
id: docker_build_push
uses: docker/[email protected]
with:
push: true
tags: "kellerkinder/pipeline-image:${{ matrix.php }}"
build-args: |
PHP_VERSION=${{ matrix.php }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' || steps.baseupdatecheck.outputs.needs-updating == 'true' }}