Build Docker Images for PHP 8.3 with Nginx Unit #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Docker Images for PHP 8.3 with Nginx Unit | |
on: | |
workflow_dispatch: | |
branches: | |
- master | |
paths: | |
- "8/8.3/Dockerfile.nunit" | |
- "8/8.3/Dockerfile.nunit.dev" | |
push: | |
branches: | |
- "master" | |
paths: | |
- "8/8.3/Dockerfile.nunit" | |
- "8/8.3/Dockerfile.nunit.dev" | |
jobs: | |
docker-build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
## Login to all 3 registries: DockerHub, GitHub Actions Container Registry, and Quay.io ## | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to the GitHub Actions Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Login to the Quay.io Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
## Build and push the Docker image ## | |
- name: Build and push the Unit Production Image | |
uses: docker/build-push-action@v5 | |
with: | |
context: 8/8.3 | |
platforms: linux/amd64,linux/arm64 | |
file: 8/8.3/Dockerfile.nunit | |
build-args: | | |
PHP_VERSION=8.3 | |
push: true | |
tags: | | |
islamicnetwork/php:8.3-unit | |
ghcr.io/islamic-network/php:8.3-unit | |
quay.io/islamic-network/php:8.3-unit | |
- name: Build and push the Unit Development Image | |
uses: docker/build-push-action@v5 | |
with: | |
context: 8/8.3 | |
platforms: linux/amd64,linux/arm64 | |
file: 8/8.3/Dockerfile.nunit.dev | |
build-args: | | |
PHP_VERSION=8.3 | |
push: true | |
tags: | | |
islamicnetwork/php:8.3-unit-dev | |
ghcr.io/islamic-network/php:8.3-unit-dev | |
quay.io/islamic-network/php:8.3-unit-dev |