Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and push Docker image

on:
push:
branches: [main]
tags: ["*"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Test image
run: |-
make test-all

- name: Push image
run: |-
make release-all
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ release: ### Build and push image to DockerHub
release-all: ### Build all PHP version and push image to DockerHub
echo "Releasing all PHP version"
VERSION=8.3 make release
VERSION=8.4 make release
VERSION=8.2 make release
VERSION=8.1 make release
VERSION=8.0 make release
Expand All @@ -29,6 +30,7 @@ test: ### Test image
$(DOCKER_RUN) sh -c "nginx -t"

test-all: ### Test all image
VERSION=8.4 make build test
VERSION=8.3 make build test
VERSION=8.2 make build test
VERSION=8.1 make build test
Expand Down