Break up monolithic build.
This commit is contained in:
parent
eca1247441
commit
47e9a2c595
10 changed files with 430 additions and 324 deletions
324
.github/workflows/build.yml
vendored
324
.github/workflows/build.yml
vendored
|
|
@ -1,324 +0,0 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 4 * * TUE'
|
||||
|
||||
jobs:
|
||||
|
||||
lint:
|
||||
name: Lint docker files
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
dockerfile:
|
||||
- marshall/Dockerfile
|
||||
- php/Dockerfile.Core
|
||||
- php/Dockerfile.Flavours
|
||||
- node/Dockerfile
|
||||
- mariadb/Dockerfile
|
||||
- redis/Dockerfile
|
||||
- octoprint/Dockerfile
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: brpaz/hadolint-action@master
|
||||
with:
|
||||
dockerfile: ${{ matrix.dockerfile }}
|
||||
|
||||
marshall-build:
|
||||
name: "Build Marshall"
|
||||
needs: [ lint ]
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Github Container Registry
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GHCR_PAT }}
|
||||
- name: Setup Marshall
|
||||
run: |
|
||||
git rev-parse --short HEAD > marshall/marshall_version
|
||||
date '+%Y-%m-%d %H:%M:%S' > marshall/marshall_build_date
|
||||
hostname > marshall/marshall_build_host
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
context: marshall
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: |
|
||||
benzine/marshall:latest
|
||||
gone/marshall:latest
|
||||
|
||||
php-build-core:
|
||||
name: "Build PHP Core"
|
||||
needs: [ lint, marshall-build ]
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version:
|
||||
#- "7.0"
|
||||
#- "7.1"
|
||||
#- "7.2"
|
||||
- "7.3"
|
||||
- "7.4"
|
||||
- "8.0"
|
||||
env:
|
||||
PHP_PACKAGES_70: git mariadb-client php7.0-apcu php7.0-bcmath php7.0-bz2 php7.0-cli php7.0-curl php7.0-gd php7.0-imap php7.0-imagick php7.0-intl php7.0-json php7.0-ldap php7.0-mbstring php7.0-mcrypt php7.0-memcache php7.0-memcached php7.0-mongodb php7.0-mysql php7.0-opcache php7.0-pgsql php7.0-phpdbg php7.0-pspell php7.0-redis php7.0-soap php7.0-sqlite php7.0-xdebug php7.0-xml php7.0-zip postgresql-client
|
||||
PHP_PACKAGES_71: git mariadb-client php7.1-apcu php7.1-bcmath php7.1-bz2 php7.1-cli php7.1-curl php7.1-gd php7.1-imap php7.1-imagick php7.1-intl php7.1-json php7.1-ldap php7.1-mbstring php7.1-mcrypt php7.1-memcache php7.1-memcached php7.1-mongodb php7.1-mysql php7.1-opcache php7.1-pgsql php7.1-phpdbg php7.1-pspell php7.1-redis php7.1-soap php7.1-sqlite php7.1-xdebug php7.1-xml php7.1-zip postgresql-client
|
||||
PHP_PACKAGES_72: git mariadb-client php7.2-apcu php7.2-bcmath php7.2-bz2 php7.2-cli php7.2-curl php7.2-gd php7.2-imap php7.2-imagick php7.2-intl php7.2-json php7.2-ldap php7.2-mbstring php7.2-memcache php7.2-memcached php7.2-mongodb php7.2-mysql php7.2-opcache php7.2-pgsql php7.2-phpdbg php7.2-pspell php7.2-redis php7.2-soap php7.2-sqlite php7.2-xdebug php7.2-xml php7.2-zip postgresql-client
|
||||
PHP_PACKAGES_73: git mariadb-client php7.3-apcu php7.3-bcmath php7.3-bz2 php7.3-cli php7.3-curl php7.3-gd php7.3-imap php7.3-imagick php7.3-intl php7.3-json php7.3-ldap php7.3-mbstring php7.3-memcache php7.3-memcached php7.3-mongodb php7.3-mysql php7.3-opcache php7.3-pgsql php7.3-phpdbg php7.3-pspell php7.3-redis php7.3-soap php7.3-sqlite php7.3-xdebug php7.3-xml php7.3-zip postgresql-client
|
||||
PHP_PACKAGES_74: git mariadb-client php7.4-apcu php7.4-bcmath php7.4-bz2 php7.4-cli php7.4-curl php7.4-gd php7.4-imap php7.4-imagick php7.4-intl php7.4-json php7.4-ldap php7.4-mbstring php7.4-memcache php7.4-mongodb php7.4-mysql php7.4-opcache php7.4-pgsql php7.4-phpdbg php7.4-pspell php7.4-redis php7.4-soap php7.4-sqlite php7.4-xdebug php7.4-xml php7.4-zip postgresql-client
|
||||
PHP_PACKAGES_80: git mariadb-client php8.0-apcu php8.0-bcmath php8.0-bz2 php8.0-cli php8.0-curl php8.0-gd php8.0-imap php8.0-imagick php8.0-intl php8.0-ldap php8.0-mbstring php8.0-memcache php8.0-mysql php8.0-opcache php8.0-pgsql php8.0-phpdbg php8.0-pspell php8.0-redis php8.0-soap php8.0-sqlite php8.0-xdebug php8.0-xml php8.0-zip postgresql-client
|
||||
steps:
|
||||
- name: Mangle Envs
|
||||
id: vars
|
||||
run: |
|
||||
VERSION=$(echo "${{ matrix.version }}" | tr -d '.')
|
||||
PACKAGE_LIST=PHP_PACKAGES_$VERSION
|
||||
echo ::set-output name=php_packages::${!PACKAGE_LIST}
|
||||
- name: Show mangled envs
|
||||
run: |
|
||||
echo "Packages to be installed:"
|
||||
echo ${{ steps.vars.outputs.php_packages }}
|
||||
- uses: actions/github-script@v3
|
||||
name: Build Args
|
||||
id: build_args
|
||||
with:
|
||||
result-encoding: string
|
||||
script: return `PHP_PACKAGES=${{ steps.vars.outputs.php_packages }}\nPHP_VERSION=${{ matrix.version }}\nPHP_CORE_VERSION=benzine/php:core-${{ matrix.version }}`
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
context: php
|
||||
file: php/Dockerfile.Core
|
||||
target: php-core
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: |
|
||||
benzine/php:core-${{ matrix.version }}
|
||||
build-args: |
|
||||
${{ steps.build_args.outputs.result }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
php-build-flavours:
|
||||
name: "Build PHP Flavours"
|
||||
needs: [ php-build-core ]
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
variant:
|
||||
- cli
|
||||
- nginx
|
||||
- apache
|
||||
version:
|
||||
#- "7.0"
|
||||
#- "7.1"
|
||||
#- "7.2"
|
||||
- "7.3"
|
||||
- "7.4"
|
||||
- "8.0"
|
||||
steps:
|
||||
- name: Mangle Envs
|
||||
id: vars
|
||||
run: |
|
||||
VERSION=$(echo "${{ matrix.version }}" | tr -d '.')
|
||||
PACKAGE_LIST=PHP_PACKAGES_$VERSION
|
||||
echo ::set-output name=php_packages::${!PACKAGE_LIST}
|
||||
- name: Show mangled envs
|
||||
run: |
|
||||
echo "Packages to be installed:"
|
||||
echo ${{ steps.vars.outputs.php_packages }}
|
||||
- uses: actions/github-script@v3
|
||||
name: Build Args
|
||||
id: build_args
|
||||
with:
|
||||
result-encoding: string
|
||||
script: return `PHP_VERSION=${{ matrix.version }}\nPHP_CORE_VERSION=benzine/php:core-${{ matrix.version }}`
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
context: php
|
||||
file: php/Dockerfile.Flavours
|
||||
target: php-${{ matrix.variant }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: |
|
||||
benzine/php:${{ matrix.variant }}-${{ matrix.version }}
|
||||
build-args: |
|
||||
${{ steps.build_args.outputs.result }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
php-vanity-tags:
|
||||
name: Vanity Tags
|
||||
needs: [ php-build-flavours ]
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
latest-stable-version: "7.4"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
variant:
|
||||
- cli
|
||||
- nginx
|
||||
- apache
|
||||
steps:
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- name: Retag benzine/php:${{ matrix.variant }}-${{ env.latest-stable-version }} to benzine/php:${{ matrix.variant }}
|
||||
run: |
|
||||
docker pull benzine/php:${{ matrix.variant }}-${{ env.latest-stable-version }}
|
||||
docker tag benzine/php:${{ matrix.variant }}-${{ env.latest-stable-version }} benzine/php:${{ matrix.variant }}
|
||||
docker push benzine/php:${{ matrix.variant }}
|
||||
docker tag benzine/php:${{ matrix.variant }}-${{ env.latest-stable-version }} gone/php:${{ matrix.variant }}-${{ env.latest-stable-version }}
|
||||
docker push gone/php:${{ matrix.variant }}-${{ env.latest-stable-version }}
|
||||
docker tag benzine/php:${{ matrix.variant }}-${{ env.latest-stable-version }} gone/php:${{ matrix.variant }}
|
||||
docker push gone/php:${{ matrix.variant }}
|
||||
|
||||
mariadb-build:
|
||||
name: "MariaDB with Healthchecks"
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ lint ]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
context: mariadb
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: |
|
||||
benzine/mariadb
|
||||
redis-build:
|
||||
name: "Redis with Healthchecks"
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ lint ]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
context: redis
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: |
|
||||
benzine/redis
|
||||
wordpress-build:
|
||||
name: "Bake Wordpress Container"
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ lint, php-build-flavours ]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
context: wordpress
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: |
|
||||
matthewbaggett/wordpress
|
||||
|
||||
octoprint-build:
|
||||
name: "Bake Octoprint"
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ lint ]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build Octoprint
|
||||
with:
|
||||
context: octoprint
|
||||
target: octoprint
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: matthewbaggett/octoprint:latest
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build Octoprint MJPG Streamer Variant
|
||||
with:
|
||||
context: octoprint
|
||||
target: octoprint-mjpg-streamer
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: matthewbaggett/octoprint:mjpg-streamer-yu12
|
||||
26
.github/workflows/lint.yml
vendored
Normal file
26
.github/workflows/lint.yml
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
name: Lint Docker Files
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 4 * * TUE'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint Docker Files
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
dockerfile:
|
||||
- marshall/Dockerfile
|
||||
- php/Dockerfile.Core
|
||||
- php/Dockerfile.Flavours
|
||||
- node/Dockerfile
|
||||
- mariadb/Dockerfile
|
||||
- redis/Dockerfile
|
||||
- octoprint/Dockerfile
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: brpaz/hadolint-action@master
|
||||
with:
|
||||
dockerfile: ${{ matrix.dockerfile }}
|
||||
35
.github/workflows/mariadb.yml
vendored
Normal file
35
.github/workflows/mariadb.yml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
name: Build MariaDB
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- mariadb
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Lint Docker Files
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
mariadb-build:
|
||||
name: "MariaDB with Healthchecks"
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ lint ]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
context: mariadb
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: |
|
||||
benzine/mariadb
|
||||
47
.github/workflows/marshall.yml
vendored
Normal file
47
.github/workflows/marshall.yml
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
name: Build Marshall
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- marshall
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Lint Docker Files
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: "Build Marshall"
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Github Container Registry
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GHCR_PAT }}
|
||||
- name: Setup Marshall
|
||||
run: |
|
||||
git rev-parse --short HEAD > marshall/marshall_version
|
||||
date '+%Y-%m-%d %H:%M:%S' > marshall/marshall_build_date
|
||||
hostname > marshall/marshall_build_host
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
context: marshall
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: |
|
||||
benzine/marshall:latest
|
||||
gone/marshall:latest
|
||||
55
.github/workflows/octoprint.yml
vendored
Normal file
55
.github/workflows/octoprint.yml
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
name: Build Octoprint
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- octoprint
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Lint Docker Files
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
octoprint-build:
|
||||
name: "Bake Octoprint"
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build Octoprint
|
||||
with:
|
||||
context: octoprint
|
||||
target: octoprint
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: matthewbaggett/octoprint:latest
|
||||
octoprint-mjpg-build:
|
||||
name: "Bake Octoprint for yuvu cameras"
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build Octoprint MJPG Streamer Variant
|
||||
with:
|
||||
context: octoprint
|
||||
target: octoprint-mjpg-streamer
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: matthewbaggett/octoprint:mjpg-streamer-yu12
|
||||
82
.github/workflows/php-core.yml
vendored
Normal file
82
.github/workflows/php-core.yml
vendored
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
name: Build PHP Core
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- php/php-core
|
||||
- php/Dockerfile.Core
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Build Marshall
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
|
||||
php-build-core:
|
||||
name: "Build PHP Core"
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version:
|
||||
#- "7.0"
|
||||
#- "7.1"
|
||||
#- "7.2"
|
||||
- "7.3"
|
||||
- "7.4"
|
||||
- "8.0"
|
||||
env:
|
||||
PHP_PACKAGES_70: git mariadb-client php7.0-apcu php7.0-bcmath php7.0-bz2 php7.0-cli php7.0-curl php7.0-gd php7.0-imap php7.0-imagick php7.0-intl php7.0-json php7.0-ldap php7.0-mbstring php7.0-mcrypt php7.0-memcache php7.0-memcached php7.0-mongodb php7.0-mysql php7.0-opcache php7.0-pgsql php7.0-phpdbg php7.0-pspell php7.0-redis php7.0-soap php7.0-sqlite php7.0-xdebug php7.0-xml php7.0-zip postgresql-client
|
||||
PHP_PACKAGES_71: git mariadb-client php7.1-apcu php7.1-bcmath php7.1-bz2 php7.1-cli php7.1-curl php7.1-gd php7.1-imap php7.1-imagick php7.1-intl php7.1-json php7.1-ldap php7.1-mbstring php7.1-mcrypt php7.1-memcache php7.1-memcached php7.1-mongodb php7.1-mysql php7.1-opcache php7.1-pgsql php7.1-phpdbg php7.1-pspell php7.1-redis php7.1-soap php7.1-sqlite php7.1-xdebug php7.1-xml php7.1-zip postgresql-client
|
||||
PHP_PACKAGES_72: git mariadb-client php7.2-apcu php7.2-bcmath php7.2-bz2 php7.2-cli php7.2-curl php7.2-gd php7.2-imap php7.2-imagick php7.2-intl php7.2-json php7.2-ldap php7.2-mbstring php7.2-memcache php7.2-memcached php7.2-mongodb php7.2-mysql php7.2-opcache php7.2-pgsql php7.2-phpdbg php7.2-pspell php7.2-redis php7.2-soap php7.2-sqlite php7.2-xdebug php7.2-xml php7.2-zip postgresql-client
|
||||
PHP_PACKAGES_73: git mariadb-client php7.3-apcu php7.3-bcmath php7.3-bz2 php7.3-cli php7.3-curl php7.3-gd php7.3-imap php7.3-imagick php7.3-intl php7.3-json php7.3-ldap php7.3-mbstring php7.3-memcache php7.3-memcached php7.3-mongodb php7.3-mysql php7.3-opcache php7.3-pgsql php7.3-phpdbg php7.3-pspell php7.3-redis php7.3-soap php7.3-sqlite php7.3-xdebug php7.3-xml php7.3-zip postgresql-client
|
||||
PHP_PACKAGES_74: git mariadb-client php7.4-apcu php7.4-bcmath php7.4-bz2 php7.4-cli php7.4-curl php7.4-gd php7.4-imap php7.4-imagick php7.4-intl php7.4-json php7.4-ldap php7.4-mbstring php7.4-memcache php7.4-mongodb php7.4-mysql php7.4-opcache php7.4-pgsql php7.4-phpdbg php7.4-pspell php7.4-redis php7.4-soap php7.4-sqlite php7.4-xdebug php7.4-xml php7.4-zip postgresql-client
|
||||
PHP_PACKAGES_80: git mariadb-client php8.0-apcu php8.0-bcmath php8.0-bz2 php8.0-cli php8.0-curl php8.0-gd php8.0-imap php8.0-imagick php8.0-intl php8.0-ldap php8.0-mbstring php8.0-memcache php8.0-mysql php8.0-opcache php8.0-pgsql php8.0-phpdbg php8.0-pspell php8.0-redis php8.0-soap php8.0-sqlite php8.0-xdebug php8.0-xml php8.0-zip postgresql-client
|
||||
steps:
|
||||
- name: Mangle Envs
|
||||
id: vars
|
||||
run: |
|
||||
VERSION=$(echo "${{ matrix.version }}" | tr -d '.')
|
||||
PACKAGE_LIST=PHP_PACKAGES_$VERSION
|
||||
echo ::set-output name=php_packages::${!PACKAGE_LIST}
|
||||
- name: Show mangled envs
|
||||
run: |
|
||||
echo "Packages to be installed:"
|
||||
echo ${{ steps.vars.outputs.php_packages }}
|
||||
- uses: actions/github-script@v3
|
||||
name: Build Args
|
||||
id: build_args
|
||||
with:
|
||||
result-encoding: string
|
||||
script: return `PHP_PACKAGES=${{ steps.vars.outputs.php_packages }}\nPHP_VERSION=${{ matrix.version }}\nPHP_CORE_VERSION=benzine/php:core-${{ matrix.version }}`
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
context: php
|
||||
file: php/Dockerfile.Core
|
||||
target: php-core
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: |
|
||||
benzine/php:core-${{ matrix.version }}
|
||||
build-args: |
|
||||
${{ steps.build_args.outputs.result }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
80
.github/workflows/php-flavours.yml
vendored
Normal file
80
.github/workflows/php-flavours.yml
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
name: Build PHP Flavours
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- php/php+apache
|
||||
- php/php+cli
|
||||
- php/php+nginx
|
||||
- php/Dockerfile.Flavours
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Build PHP Core
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
php-build-flavours:
|
||||
name: "Build PHP Flavours"
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
variant:
|
||||
- cli
|
||||
- nginx
|
||||
- apache
|
||||
version:
|
||||
#- "7.0"
|
||||
#- "7.1"
|
||||
#- "7.2"
|
||||
- "7.3"
|
||||
- "7.4"
|
||||
- "8.0"
|
||||
steps:
|
||||
- name: Mangle Envs
|
||||
id: vars
|
||||
run: |
|
||||
VERSION=$(echo "${{ matrix.version }}" | tr -d '.')
|
||||
PACKAGE_LIST=PHP_PACKAGES_$VERSION
|
||||
echo ::set-output name=php_packages::${!PACKAGE_LIST}
|
||||
- name: Show mangled envs
|
||||
run: |
|
||||
echo "Packages to be installed:"
|
||||
echo ${{ steps.vars.outputs.php_packages }}
|
||||
- uses: actions/github-script@v3
|
||||
name: Build Args
|
||||
id: build_args
|
||||
with:
|
||||
result-encoding: string
|
||||
script: return `PHP_VERSION=${{ matrix.version }}\nPHP_CORE_VERSION=benzine/php:core-${{ matrix.version }}`
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
context: php
|
||||
file: php/Dockerfile.Flavours
|
||||
target: php-${{ matrix.variant }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: |
|
||||
benzine/php:${{ matrix.variant }}-${{ matrix.version }}
|
||||
build-args: |
|
||||
${{ steps.build_args.outputs.result }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
37
.github/workflows/php-vanity-tags.yml
vendored
Normal file
37
.github/workflows/php-vanity-tags.yml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
name: Build PHP Vanity Tags
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Build PHP Flavours
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
php-vanity-tags:
|
||||
name: Vanity Tags
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
latest-stable-version: "7.4"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
variant:
|
||||
- cli
|
||||
- nginx
|
||||
- apache
|
||||
steps:
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- name: Retag benzine/php:${{ matrix.variant }}-${{ env.latest-stable-version }} to benzine/php:${{ matrix.variant }}
|
||||
run: |
|
||||
docker pull benzine/php:${{ matrix.variant }}-${{ env.latest-stable-version }}
|
||||
docker tag benzine/php:${{ matrix.variant }}-${{ env.latest-stable-version }} benzine/php:${{ matrix.variant }}
|
||||
docker push benzine/php:${{ matrix.variant }}
|
||||
docker tag benzine/php:${{ matrix.variant }}-${{ env.latest-stable-version }} gone/php:${{ matrix.variant }}-${{ env.latest-stable-version }}
|
||||
docker push gone/php:${{ matrix.variant }}-${{ env.latest-stable-version }}
|
||||
docker tag benzine/php:${{ matrix.variant }}-${{ env.latest-stable-version }} gone/php:${{ matrix.variant }}
|
||||
docker push gone/php:${{ matrix.variant }}
|
||||
34
.github/workflows/redis.yml
vendored
Normal file
34
.github/workflows/redis.yml
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
name: Build Redis
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- redis
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Lint Docker Files
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
redis-build:
|
||||
name: "Redis with Healthchecks"
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
context: redis
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: |
|
||||
benzine/redis
|
||||
34
.github/workflows/wordpress.yml
vendored
Normal file
34
.github/workflows/wordpress.yml
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
name: Build Wordpress Container
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- wordpress
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Build PHP Vanity Tags
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
wordpress-build:
|
||||
name: "Bake Wordpress Container"
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to Docker Hub
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- uses: docker/build-push-action@v2
|
||||
name: Build & Push
|
||||
with:
|
||||
context: wordpress
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: |
|
||||
matthewbaggett/wordpress
|
||||
Loading…
Reference in a new issue