168 lines
5.9 KiB
YAML
168 lines
5.9 KiB
YAML
name: Build and push PHP 5 container images
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- php5-alpine
|
|
|
|
jobs:
|
|
build:
|
|
name: Build PHP 5 container images
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
|
strategy:
|
|
matrix:
|
|
flavors:
|
|
- os: "alpine"
|
|
os_version: "3.6"
|
|
php_version: "5.6"
|
|
php_ver_short: "5"
|
|
mode: cli
|
|
with_server: "false"
|
|
with_database: "false"
|
|
- os: "alpine"
|
|
os_version: "3.6"
|
|
php_version: "5.6"
|
|
php_ver_short: "5"
|
|
mode: full
|
|
with_server: "false"
|
|
with_database: "false"
|
|
- os: "alpine"
|
|
os_version: "3.6"
|
|
php_version: "5.6"
|
|
php_ver_short: "5"
|
|
mode: debug
|
|
with_server: "false"
|
|
with_database: "false"
|
|
- os: "alpine"
|
|
os_version: "3.6"
|
|
php_version: "5.6"
|
|
php_ver_short: "5"
|
|
mode: full
|
|
with_server: "apache"
|
|
with_database: "false"
|
|
- os: "alpine"
|
|
os_version: "3.6"
|
|
php_version: "5.6"
|
|
php_ver_short: "5"
|
|
mode: full
|
|
with_server: "apache"
|
|
with_database: "mysql"
|
|
- os: "alpine"
|
|
os_version: "3.6"
|
|
php_version: "5.6"
|
|
php_ver_short: "5"
|
|
mode: full
|
|
with_server: "apache"
|
|
with_database: "postgresql"
|
|
- os: "alpine"
|
|
os_version: "3.6"
|
|
php_version: "5.6"
|
|
php_ver_short: "5"
|
|
mode: debug
|
|
with_server: "apache"
|
|
with_database: "false"
|
|
- os: "alpine"
|
|
os_version: "3.6"
|
|
php_version: "5.6"
|
|
php_ver_short: "5"
|
|
mode: debug
|
|
with_server: "apache"
|
|
with_database: "mysql"
|
|
- os: "alpine"
|
|
os_version: "3.6"
|
|
php_version: "5.6"
|
|
php_ver_short: "5"
|
|
mode: debug
|
|
with_server: "apache"
|
|
with_database: "postgresql"
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
- name: Login to quay.io
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: quay.io
|
|
username: ${{ vars.QUAY_USERNAME }}
|
|
password: ${{ secrets.QUAY_SECRET }}
|
|
# - name: Set up QEMU
|
|
# uses: docker/setup-qemu-action@v3
|
|
- name: Setup Docker buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- if: ${{ matrix.flavors.with_server == 'false' && matrix.flavors.with_database == 'false' }}
|
|
name: Build and push php5
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
push: true
|
|
context: .
|
|
file: 5/Dockerfile.${{ matrix.flavors.os }}
|
|
build-args: |
|
|
OS_VERSION=${{ matrix.flavors.os_version }}
|
|
FLAVOR=${{ matrix.flavors.mode }}
|
|
PHP_VERSION=${{ matrix.flavors.php_version }}
|
|
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
|
|
tags: |
|
|
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-${{ matrix.flavors.mode }}-${{ matrix.flavors.os }}
|
|
- if: ${{ matrix.flavors.with_server != 'false' && matrix.flavors.with_database == 'false' }}
|
|
name: Build and push php5 with webserver
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
push: true
|
|
context: .
|
|
file: 5/Dockerfile.${{ matrix.flavors.with_server }}-${{ matrix.flavors.os }}
|
|
build-args: |
|
|
OS_VERSION=${{ matrix.flavors.os_version }}
|
|
FLAVOR=${{ matrix.flavors.mode }}
|
|
PHP_VERSION=${{ matrix.flavors.php_version }}
|
|
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
|
|
WITH_APACHE=true
|
|
tags: |
|
|
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-${{ matrix.flavors.mode }}-${{ matrix.flavors.with_server }}-${{ matrix.flavors.os }}
|
|
- if: ${{ matrix.flavors.with_server != 'false' && matrix.flavors.with_database != 'false' }}
|
|
name: Build and push php5 with apache2 and database connector library
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
push: true
|
|
context: .
|
|
file: 5/Dockerfile.${{ matrix.flavors.with_server }}-${{ matrix.flavors.os }}
|
|
build-args: |
|
|
OS_VERSION=${{ matrix.flavors.os_version }}
|
|
FLAVOR=${{ matrix.flavors.mode }}
|
|
PHP_VERSION=${{ matrix.flavors.php_version }}
|
|
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
|
|
WITH_APACHE=true
|
|
WITH_DATABASE=${{ matrix.flavors.with_database }}
|
|
tags: |
|
|
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-${{ matrix.flavors.mode }}-${{ matrix.flavors.with_server }}-${{ matrix.flavors.with_database }}-${{ matrix.flavors.os }}
|
|
# build-latest:
|
|
# name: Build latest nginx alpine based container images
|
|
# runs-on: ubuntu-latest
|
|
# needs:
|
|
# - build
|
|
# container:
|
|
# image: ghcr.io/catthehacker/ubuntu:act-latest
|
|
# steps:
|
|
# - name: Check out repository code
|
|
# uses: actions/checkout@v4
|
|
# - name: Login to quay.io
|
|
# uses: docker/login-action@v3
|
|
# with:
|
|
# registry: quay.io
|
|
# username: ${{ vars.QUAY_USERNAME }}
|
|
# password: ${{ secrets.QUAY_SECRET }}
|
|
# # - name: Set up QEMU
|
|
# # uses: docker/setup-qemu-action@v3
|
|
# - name: Setup Docker buildx
|
|
# uses: docker/setup-buildx-action@v3
|
|
# - name: Build and push latest nginx
|
|
# uses: docker/build-push-action@v5
|
|
# with:
|
|
# # platforms: linux/amd64,linux/arm64
|
|
# push: true
|
|
# context: .
|
|
# file: Dockerfile.alpine
|
|
# tags: |
|
|
# quay.io/sindigilive/nginx:alpine
|
|
# quay.io/sindigilive/nginx:latest
|