Skip to content

Validate HTTP3 server listener on wire #70

Validate HTTP3 server listener on wire

Validate HTTP3 server listener on wire #70

Workflow file for this run

name: King Docker Build & Push
on:
push:
branches: [ main, develop ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
build-and-push:
name: Build, Smoke & Push Docker Images
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2', '8.3', '8.4', '8.5']
include:
- php-version: '8.1'
platforms: linux/amd64,linux/arm64
latest: false
- php-version: '8.2'
platforms: linux/amd64,linux/arm64
latest: false
- php-version: '8.3'
platforms: linux/amd64,linux/arm64
latest: false
- php-version: '8.4'
platforms: linux/amd64,linux/arm64
latest: false
- php-version: '8.5'
platforms: linux/amd64,linux/arm64
latest: true
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Log in to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=php${{ matrix.php-version }}
type=raw,value=latest,enable=${{ matrix.latest && github.ref == 'refs/heads/main' }}
- name: Build and push King PHP ${{ matrix.php-version }}
uses: docker/build-push-action@v7
with:
context: .
file: ./infra/php-runtime.Dockerfile
platforms: ${{ matrix.platforms }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
PHP_VERSION=${{ matrix.php-version }}
BUILD_JOBS=4
BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VCS_REF=${{ github.sha }}
# Build demo application image
build-demo:
name: Build Demo Application
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Log in to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for demo
id: meta-demo
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-demo
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push demo application
uses: docker/build-push-action@v7
with:
context: .
file: ./infra/demo-server/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-demo.outputs.tags }}
labels: ${{ steps.meta-demo.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max