Skip to content

build

build #29

Workflow file for this run

name: build
on:
workflow_dispatch:
# push:
jobs:
build:
runs-on: ubuntu-20.04
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}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
nhzex/php
ghcr.io/NHZEX/php
tags: |
type=raw,${{ matrix.image.tag }}
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to Github
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PAT_CONTAINER }}
- name: Push to Docker
uses: docker/build-push-action@v3
with:
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 }}