Skip to content

build

build #35

Workflow file for this run

name: build
on:
workflow_dispatch:
# push:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
image:
# - {tag: 8.0.28-cli-swoole4-im6, file: swoole/8.0-swoole-4.x.Dockerfile}
# - {tag: 8.0.28-cli-swoole5-im6, file: swoole/8.0-swoole-5.x.Dockerfile}
# - {tag: 8.1.18-cli-swoole4-im6, file: swoole/8.1-swoole-4.x.Dockerfile}
# - {tag: 8.1.18-cli-swoole5-im6, file: swoole/8.1-swoole-5.x.Dockerfile}
- {tag: 8.1-v2-py, file: php-v2/8.1.Dockerfile}
- {tag: 8.2-v2-py, file: php-v2/8.2.Dockerfile}
- {tag: 8.3-v2-py, file: php-v2/8.3.Dockerfile}
- {tag: 8.4-v2-py, file: php-v2/8.4.Dockerfile}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
nhzex/php
ghcr.io/NHZEX/php
tags: |
type=raw,${{ matrix.image.tag }}
labels: |
org.opencontainers.image.url=unk
org.opencontainers.image.source=unk
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to Github
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PAT_CONTAINER }}
- name: Push to Docker
uses: docker/build-push-action@v6
with:
cache-from: type=registry,ref=ghcr.io/NHZEX/buildcache-php:${{ matrix.image.tag }}
cache-to: type=registry,ref=ghcr.io/NHZEX/buildcache-php:${{ matrix.image.tag }},mode=max,compression=zstd
context: php-v2
file: ${{ matrix.image.file }}
build-args: |
CN=0
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}