This commit is contained in:
Greyscale 2024-01-26 17:30:42 +01:00
parent b17a8521c8
commit 4f9eb125a4
No known key found for this signature in database
GPG key ID: 74BAFF55434DA4B2
14 changed files with 243 additions and 98 deletions

View file

@ -41,16 +41,14 @@ jobs:
- name: "Setup: Setup QEMU"
uses: docker/setup-qemu-action@v2
- name: "Setup: Expose GitHub Runtime"
uses: crazy-max/ghaction-github-runtime@v3
- name: "Setup: Setup Docker Buildx"
uses: docker/setup-buildx-action@v2
- name: "Setup: Checkout Source"
uses: actions/checkout@v4
with:
sparse-checkout: |
bouncer
- name: "Setup: Login to Docker Hub"
if: ${{ !env.ACT }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
@ -63,6 +61,12 @@ jobs:
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PASSWORD }}
- name: "Setup: Checkout Source"
uses: actions/checkout@v4
with:
sparse-checkout: |
bouncer
- name: "Setup: Configure Cache"
uses: actions/cache@v4
with:
@ -75,18 +79,20 @@ jobs:
working-directory: bouncer
run: composer install --ignore-platform-reqs
- name: "Build: Build & Push image to GHCR & Docker Hub"
uses: docker/build-push-action@v4
- name: "Build: Build & Push Image"
uses: docker/build-push-action@v5
with:
context: bouncer
platforms: linux/amd64,linux/arm64
target: bouncer
platforms: ${{ !env.ACT && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
pull: true
push: true
target: bouncer
build-args: |
GIT_SHA=${{ github.sha }}
BUILD_DATE=${{ steps.date.outputs.container_build_datetime }}
GIT_COMMIT_MESSAGE=${{ github.event.head_commit.message }}
tags: |
benzine/bouncer
ghcr.io/benzine-framework/bouncer:latest
${{ !env.ACT && 'benzine/bouncer:latest' || '' }}
${{ !env.ACT && 'ghcr.io/benzine-framework/bouncer:latest' || 'ghcr.io/benzine-framework/bouncer:devel' }}
cache-from: ${{ !env.ACT && 'type=gha' || 'type=local,src=.cache' }}
cache-to: ${{ !env.ACT && 'type=gha,mode=max' || 'type=local,dest=.cache' }}

View file

@ -26,26 +26,35 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
sparse-checkout: laravel
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
name: Login to Docker Hub
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- uses: docker/build-push-action@v3
name: Build & Push
with:
context: laravel
platforms: linux/amd64,linux/arm64
platforms: ${{ !env.ACT && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
pull: true
push: true
push: ${{ !env.ACT && true || false }}
build-args: |
PHP_VERSION=${{ matrix.version }}
tags: |
matthewbaggett/laravel:${{ matrix.version }}
cache-from: ${{ !env.ACT && 'type=gha' || 'type=local,src=.cache' }}
cache-to: ${{ !env.ACT && 'type=gha,mode=max' || 'type=local,dest=.cache' }}
laravel-tag-latest:
name: "Bake Laravel Container"
@ -57,7 +66,9 @@ jobs:
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- run: |
- name: "Retag matthewbaggett/laravel:${{ matrix.version }} to matthewbaggett/laravel:latest"
if: ${{ !env.ACT }}
run: |
docker pull matthewbaggett/laravel:8.2
docker tag matthewbaggett/laravel:8.2 matthewbaggett/laravel:latest
docker push matthewbaggett/laravel:latest

View file

@ -25,6 +25,6 @@ jobs:
- bouncer/Dockerfile
steps:
- uses: actions/checkout@v3
- uses: hadolint/hadolint-action@v3.0.0
- uses: hadolint/hadolint-action@v3
with:
dockerfile: ./${{ matrix.dockerfile }}

View file

@ -21,25 +21,54 @@ jobs:
name: "Build Marshall"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Build: Prepare Environment Variables"
id: environment
run: |
{
echo "datetime=$(date +'%Y-%m-%d %H:%M:%S')"
echo "date=$(date +'%Y-%m-%d')"
echo "time=$(date +'%H:%M:%S')"
echo "container_build_datetime=$(date -u +'%Y-%m-%dT%H:%M:%S.%3NZ')"
echo "marshall_version=$(git rev-parse --short HEAD)"
echo "marshall_build_date=$(date '+%Y-%m-%d %H:%M:%S')"
echo "marshall_build_host=$(hostname)"
} >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
sparse-checkout: |
marshall
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
name: Login to Docker Hub
- name: "Setup: Login to Docker Hub"
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- 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@v3
- name: "Setup: Login to GHCR"
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PASSWORD }}
- uses: docker/build-push-action@v5
name: Build & Push
with:
context: marshall
platforms: linux/amd64,linux/arm64
platforms: ${{ !env.ACT && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
pull: true
push: true
push: ${{ !env.ACT && true || false }}
tags: |
ghcr.io/benzine-framework/marshall:latest
benzine/marshall:latest
build-args: |
MARSHALL_VERSION=${{ steps.environment.outputs.marshall_version }}
MARSHALL_BUILD_DATE=${{ steps.environment.outputs.marshall_build_date }}
MARSHALL_BUILD_HOST=${{ steps.environment.outputs.marshall_build_host }}
cache-from: ${{ !env.ACT && 'type=gha' || 'type=local,src=.cache' }}
cache-to: ${{ !env.ACT && 'type=gha,mode=max' || 'type=local,dest=.cache' }}

View file

@ -22,28 +22,29 @@ jobs:
name: "Build PHP Core"
runs-on: ubuntu-latest
strategy:
max-parallel: ${{ !env.ACT && 15 || 1 }}
fail-fast: false
matrix:
version:
#- "7.0"
#- "7.1"
#- "7.2"
#- "7.3"
#- "7.4"
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
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 htop 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 htop 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 htop 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-mailparse php8.0-mbstring php8.0-memcache php8.0-mongodb 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
PHP_PACKAGES_81: git htop mariadb-client php8.1-apcu php8.1-bcmath php8.1-bz2 php8.1-cli php8.1-curl php8.1-gd php8.1-imap php8.1-imagick php8.1-intl php8.1-ldap php8.1-mailparse php8.1-mbstring php8.1-memcache php8.1-mongodb php8.1-mysql php8.1-opcache php8.1-pgsql php8.1-phpdbg php8.1-pspell php8.1-redis php8.1-soap php8.1-sqlite php8.1-xdebug php8.1-xml php8.1-zip postgresql-client
PHP_PACKAGES_82: git htop mariadb-client php8.2-apcu php8.2-bcmath php8.2-bz2 php8.2-cli php8.2-curl php8.2-gd php8.2-imap php8.2-imagick php8.2-intl php8.2-ldap php8.2-mailparse php8.2-mbstring php8.2-memcache php8.2-mongodb php8.2-mysql php8.2-opcache php8.2-pgsql php8.2-phpdbg php8.2-pspell php8.2-redis php8.2-soap php8.2-sqlite php8.2-xdebug php8.2-xml php8.2-zip postgresql-client
PHP_PACKAGES_83: git htop mariadb-client php8.3-apcu php8.3-bcmath php8.3-bz2 php8.3-cli php8.3-curl php8.3-gd php8.3-imap php8.3-imagick php8.3-intl php8.3-ldap php8.3-mailparse php8.3-mbstring php8.3-memcache php8.3-mongodb php8.3-mysql php8.3-opcache php8.3-pgsql php8.3-phpdbg php8.3-pspell php8.3-redis php8.3-soap php8.3-sqlite php8.3-xdebug php8.3-xml php8.3-zip postgresql-client
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 htop btop 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 htop btop 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 htop btop 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-mailparse php8.0-mbstring php8.0-memcache php8.0-mongodb 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
PHP_PACKAGES_81: git htop btop mariadb-client php8.1-apcu php8.1-bcmath php8.1-bz2 php8.1-cli php8.1-curl php8.1-gd php8.1-imap php8.1-imagick php8.1-intl php8.1-ldap php8.1-mailparse php8.1-mbstring php8.1-memcache php8.1-mongodb php8.1-mysql php8.1-opcache php8.1-pgsql php8.1-phpdbg php8.1-pspell php8.1-redis php8.1-soap php8.1-sqlite php8.1-xdebug php8.1-xml php8.1-zip postgresql-client
PHP_PACKAGES_82: git htop btop mariadb-client php8.2-apcu php8.2-bcmath php8.2-bz2 php8.2-cli php8.2-curl php8.2-gd php8.2-imap php8.2-imagick php8.2-intl php8.2-ldap php8.2-mailparse php8.2-mbstring php8.2-memcache php8.2-mongodb php8.2-mysql php8.2-opcache php8.2-pgsql php8.2-phpdbg php8.2-pspell php8.2-redis php8.2-soap php8.2-sqlite php8.2-xdebug php8.2-xml php8.2-zip postgresql-client
PHP_PACKAGES_83: git htop btop mariadb-client php8.3-apcu php8.3-bcmath php8.3-bz2 php8.3-cli php8.3-curl php8.3-gd php8.3-imap php8.3-imagick php8.3-intl php8.3-ldap php8.3-mailparse php8.3-mbstring php8.3-memcache php8.3-mongodb php8.3-mysql php8.3-opcache php8.3-pgsql php8.3-phpdbg php8.3-pspell php8.3-redis php8.3-soap php8.3-sqlite php8.3-xdebug php8.3-xml php8.3-zip postgresql-client
steps:
- name: Mangle Envs
id: vars
@ -51,36 +52,54 @@ jobs:
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@v3
- uses: actions/checkout@v4
with:
sparse-checkout: php
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
name: Login to Docker Hub
- name: "Setup: Login to Docker Hub"
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- uses: docker/build-push-action@v3
name: Build & Push
- name: "Setup: Login to GHCR"
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PASSWORD }}
- name: "Build: Build & Push"
uses: docker/build-push-action@v5
with:
context: php
file: php/Dockerfile.Core
target: php-core
platforms: linux/amd64,linux/arm64
platforms: ${{ !env.ACT && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
pull: true
push: true
push: ${{ !env.ACT && true || false }}
tags: |
ghcr.io/benzine-framework/php:core-${{ matrix.version }}
gone/php:core-${{ matrix.version }}
benzine/php:core-${{ matrix.version }}
build-args: |
${{ steps.build_args.outputs.result }}
cache-from: ${{ !env.ACT && 'type=gha' || 'type=local,src=.cache' }}
cache-to: ${{ !env.ACT && 'type=gha,mode=max' || 'type=local,dest=.cache' }}

View file

@ -24,20 +24,22 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: ${{ !env.ACT && 15 || 1 }}
matrix:
variant:
- cli
- nginx
- apache
version:
#- "7.0"
#- "7.1"
#- "7.2"
#- "7.3"
#- "7.4"
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
steps:
- name: Mangle Envs
id: vars
@ -45,35 +47,54 @@ jobs:
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@v3
- uses: actions/checkout@v4
with:
sparse-checkout: php
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
name: Login to Docker Hub
- name: "Setup: Login to Docker Hub"
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- uses: docker/build-push-action@v3
name: Build & Push
- name: "Setup: Login to GHCR"
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PASSWORD }}
- uses: docker/build-push-action@v5
name: "Build: Build & Push"
with:
context: php
file: php/Dockerfile.Flavours
target: php-${{ matrix.variant }}
platforms: linux/amd64,linux/arm64
platforms: ${{ !env.ACT && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
pull: true
push: true
push: ${{ !env.ACT && true || false }}
tags: |
ghcr.io/benzine-framework/php:${{ matrix.variant }}-${{ matrix.version }}
gone/php:${{ matrix.variant }}-${{ matrix.version }}
benzine/php:${{ matrix.variant }}-${{ matrix.version }}
build-args: |
${{ steps.build_args.outputs.result }}
cache-from: ${{ !env.ACT && 'type=gha' || 'type=local,src=.cache' }}
cache-to: ${{ !env.ACT && 'type=gha,mode=max' || 'type=local,dest=.cache' }}

View file

@ -14,7 +14,8 @@ jobs:
name: Vanity Tags
runs-on: ubuntu-latest
env:
latest-stable-version: "8.2"
latest-stable-version: "8.3"
base_tag: "benzine/php"
strategy:
fail-fast: false
matrix:
@ -22,18 +23,27 @@ jobs:
- cli
- nginx
- apache
output_tag:
- "benzine/php"
- "gone/php"
- "ghcr.io/benzine-framework/php"
steps:
- uses: docker/login-action@v2
name: Login to Docker Hub
- name: "Setup: Login to Docker Hub"
uses: docker/login-action@v2
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 }}
- name: "Setup: Login to GHCR"
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PASSWORD }}
- name: "Retag ${{ env.base_tag }}:${{ matrix.variant }}-${{ env.latest-stable-version }} to ${{ matrix.output_tag }}:${{ 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 }}
docker pull ${{ env.base_tag }}:${{ matrix.variant }}-${{ env.latest-stable-version }}
docker tag ${{ env.base_tag }}:${{ matrix.variant }}-${{ env.latest-stable-version }} ${{ matrix.output_tag }}:${{ matrix.variant }}
docker push ${{ matrix.output_tag }}:${{ matrix.variant }}

View file

@ -19,21 +19,69 @@ jobs:
redis-build:
name: "Redis with Healthchecks"
runs-on: ubuntu-latest
strategy:
max-parallel: ${{ !env.ACT && 15 || 1 }}
matrix:
redis:
- 3
- 4
- 5
- 6
- 6-alpine
- 6-buster
- 6.0
- 6.1
- 6.2
- 7
- 7-alpine
- 7-bookworm
- 7.0
- 7.1
- 7.2
- latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
name: Login to Docker Hub
- name: "Setup: Setup QEMU"
uses: docker/setup-qemu-action@v2
- name: "Setup: Expose GitHub Runtime"
uses: crazy-max/ghaction-github-runtime@v3
- name: "Setup: Setup Docker Buildx"
uses: docker/setup-buildx-action@v2
- name: "Setup: Checkout Source"
uses: actions/checkout@v4
with:
sparse-checkout: |
redis
- name: "Setup: Login to Docker Hub"
if: ${{ !env.ACT }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- uses: docker/build-push-action@v3
name: Build & Push
- name: "Setup: Login to GHCR"
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PASSWORD }}
- name: "Build: Build"
uses: docker/build-push-action@v5
with:
context: redis
platforms: linux/amd64,linux/arm64
build-contexts: |
redis=docker-image://redis:${{ matrix.redis }}
platforms: ${{ !env.ACT && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
pull: true
push: true
push: ${{ !env.ACT && true || false }}
tags: |
benzine/redis
${{ !env.ACT && format('benzine/redis:{0}',matrix.redis) || '' }}
${{ format('ghcr.io/benzine-framework/redis:{0}', matrix.redis) }}
cache-from: ${{ !env.ACT && 'type=gha' || 'type=local,src=.cache' }}
cache-to: ${{ !env.ACT && 'type=gha,mode=max' || 'type=local,dest=.cache' }}

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
.idea
/.php-cs-fixer.cache
.cache

View file

@ -4,16 +4,18 @@ LABEL maintainer="Matthew Baggett <matthew@baggett.me>" \
org.label-schema.vcs-url="https://github.com/benzine-framework/docker" \
org.opencontainers.image.source="https://github.com/benzine-framework/docker"
ARG MARSHALL_VERSION
ARG MARSHALL_BUILD_DATE
ARG MARSHALL_BUILD_HOST
ENV DEBIAN_FRONTEND="teletype" \
TERM=xterm-256color \
COMPOSER_ALLOW_SUPERUSER=1 \
COLOUR_FAIL='\e[31m' \
COLOUR_SUCCESS='\e[32m' \
COLOUR_NONE='\e[39m' \
DEFAULT_TZ='Europe/London'
DEFAULT_TZ='Europe/London' \
MARSHALL_VERSION=${MARSHALL_VERSION} \
MARSHALL_BUILD_DATE=${MARSHALL_BUILD_DATE} \
MARSHALL_BUILD_HOST=${MARSHALL_BUILD_HOST}
WORKDIR /app
SHELL ["/bin/bash", "-c"]
ENV PATH="/app:/app/bin:/app/vendor/bin:${PATH}"
ENV PS1="\[\e[31m\][\[\e[m\]\[\e[38;5;172m\]\u\[\e[m\]@\[\e[38;5;153m\]\h\[\e[m\] \[\e[38;5;214m\]\W\[\e[m\]\[\e[31m\]]\[\e[m\]\\$ "

View file

@ -1,10 +1,10 @@
#!/usr/bin/env bash
# Fix for windows hosts manging run files
dos2unix -q /etc/service/*/run
dos2unix -q /etc/service/*/run /etc/service/*/finish
# Fix permissions on run files
chmod +x /etc/service/*/run
chmod +x /etc/service/*/run /etc/service/*/finish
# Start Runit.
runsvdir -P /etc/service
runsvdir -P /etc/service

View file

@ -4,6 +4,7 @@ LABEL maintainer="Matthew Baggett <matthew@baggett.me>" \
org.label-schema.vcs-url="https://github.com/benzine-framework/docker" \
org.opencontainers.image.source="https://github.com/benzine-framework/docker"
ARG PHP_PACKAGES
ENV COMPOSER_ALLOW_SUPERUSER=1
COPY core/install-report.sh /usr/bin/install-report
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo "APT::Acquire::Retries \"5\";" > /etc/apt/apt.conf.d/80-retries && \

View file

@ -1,7 +1,4 @@
#!/bin/bash
MARSHALL_VERSION=$(cat /etc/marshall_version)
MARSHALL_BUILD_DATE=$(cat /etc/marshall_build_date)
MARSHALL_BUILD_HOST=$(cat /etc/marshall_build_host)
UBUNTU_VERSION=$(cat /etc/os-release | grep VERSION= | cut -d'=' -f2 | sed -e 's/\"//g')
PHP_VERSION=$(/usr/bin/php --version | head -n 1 | cut -d' ' -f2 | cut -d'-' -f1);
COMPOSER_VERSION=$(/usr/local/bin/composer --version | cut -d' ' -f 3);
@ -42,7 +39,7 @@ echo
# @todo This bombs out if it can't read from a restricted repo. Revise later.
#if [ -f /app/composer.json ]; then
# if [ -f /app/composer.lock ]; then
# echo -e "Outdated ${COLOUR_FAIL}Composer${COLOUR_NONE} packages:"
# echo -e "Outdated ${COLOUR_FAIL}Composer${COLOUR_RESET} packages:"
# /usr/local/bin/composer outdated
# fi
#fi

View file

@ -1,9 +1,9 @@
# From upstream redis
# hadolint ignore=DL3007
FROM redis:latest
FROM redis
LABEL maintainer="Matthew Baggett <matthew@baggett.me>" \
org.label-schema.vcs-url="https://github.com/benzine-framework/docker" \
org.opencontainers.image.source="https://github.com/benzine-framework/docker"
# Add healthcheck
HEALTHCHECK --interval=30s --timeout=3s \
CMD redis-cli PING
CMD redis-cli PING