Skip to content

Add missing comments to runtime base in PHP Dockerfiles #3

Add missing comments to runtime base in PHP Dockerfiles

Add missing comments to runtime base in PHP Dockerfiles #3

Workflow file for this run

name: PHP-CLI
on:
push:
branches: [ main ]
paths:
- 'docker/php/cli/base/**'
- 'build-cli.yml'
schedule:
- cron: '0 2 * * 1' # weekly rebuild
workflow_dispatch:
permissions:
contents: read
packages: write # push to GHCR
id-token: write # cosign keyless
env:
DOCKERHUB_NS: liquidrazor
GHCR_NS: ghcr.io/liquidrazor
# Patch versions (immutable tag source)
PHP_84: ${{ vars.PHP_84_VERSION }}
PHP_83: ${{ vars.PHP_83_VERSION }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# -------- PHP 8.4 --------
- php_line: 8.4
php_version_env: PHP_84
target: cli
tags: 8.4-cli,cli
# -------- PHP 8.3 --------
- php_line: 8.3
php_version_env: PHP_83
target: cli
tags: 8.3-cli
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
# Login to GHCR
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Login to Docker Hub
- uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & Push ${{ matrix.php_line }} ${{ matrix.target }}
id: build
uses: docker/build-push-action@v6
with:
context: docker/php/cli/base
file: docker/php/cli/base/Dockerfile
target: ${{ matrix.target }}
push: true
platforms: linux/amd64,linux/arm64
build-args: |
PHP_VERSION=${{ env[matrix.php_version_env] }}
# Separate caches per PHP line and target
cache-from: type=gha,scope=${{ matrix.php_line }}-${{ matrix.target }}
cache-to: type=gha,mode=max,scope=${{ matrix.php_line }}-${{ matrix.target }}
# ---- TAGS: rolling + immutable (patch-pinned) ----
tags: |
${{ env.GHCR_NS }}/php:${{ matrix.tags }}
docker.io/${{ env.DOCKERHUB_NS }}/php:${{ matrix.tags }}
${{ env.GHCR_NS }}/php:${{ env[matrix.php_version_env] }}-${{ matrix.target }}
docker.io/${{ env.DOCKERHUB_NS }}/php:${{ env[matrix.php_version_env] }}-${{ matrix.target }}