Merge pull request #40 from Lan2Play/dependabot/github_actions/php8.1… #103
Workflow file for this run
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: Test and Build | |
on: | |
push: | |
branches: | |
- php8.1 | |
- php8.2 | |
pull_request: | |
branches: | |
- php8.1 | |
- php8.2 | |
repository_dispatch: # Allows action to be triggered via webhook | |
workflow_dispatch: # Allows action to be run manually from the Actions tab | |
jobs: | |
build-docker: | |
if: ${{ github.ref_name == 'php8.1' || github.base_ref == 'php8.1' || github.ref_name == 'php8.2' || github.base_ref == 'php8.2' }} | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build 8.1 Linux Image | |
if: ${{ github.event_name == 'pull_request' && (github.ref_name == 'php8.1' || github.base_ref == 'php8.1') }} | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm/v7 | |
tags: | | |
lan2play/docker-php-nginx-base:php8.1 | |
lan2play/docker-php-nginx-base:v3 | |
build-args: | | |
BUILDNODE=GitHub (Run Number: ${{ github.run_number }} Run ID: ${{ github.run_id }}) | |
BUILDID=${{ github.run_id }} | |
BUILDNUMBER=${{ github.run_number }} | |
SOURCE_COMMIT=${{ github.sha }} | |
no-cache: true | |
push: false | |
- name: Build and push 8.1 Linux Image | |
if: ${{ github.event_name != 'pull_request' && (github.ref_name == 'php8.1' || github.base_ref == 'php8.1') }} | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm/v7 | |
tags: | | |
lan2play/docker-php-nginx-base:php8.1 | |
lan2play/docker-php-nginx-base:v3 | |
build-args: | | |
BUILDNODE=GitHub (Run Number: ${{ github.run_number }} Run ID: ${{ github.run_id }}) | |
BUILDID=${{ github.run_id }} | |
BUILDNUMBER=${{ github.run_number }} | |
SOURCE_COMMIT=${{ github.sha }} | |
no-cache: true | |
push: true | |
- name: Build 8.2 Linux Image | |
if: ${{ github.event_name == 'pull_request' && (github.ref_name == 'php8.2' || github.base_ref == 'php8.2') }} | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm/v7 | |
tags: | | |
lan2play/docker-php-nginx-base:latest | |
lan2play/docker-php-nginx-base:php8.2 | |
lan2play/docker-php-nginx-base:v4 | |
build-args: | | |
BUILDNODE=GitHub (Run Number: ${{ github.run_number }} Run ID: ${{ github.run_id }}) | |
BUILDID=${{ github.run_id }} | |
BUILDNUMBER=${{ github.run_number }} | |
SOURCE_COMMIT=${{ github.sha }} | |
no-cache: true | |
push: false | |
- name: Build and push 8.2 Linux Image | |
if: ${{ github.event_name != 'pull_request' && (github.ref_name == 'php8.2' || github.base_ref == 'php8.2') }} | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm/v7 | |
tags: | | |
lan2play/docker-php-nginx-base:latest | |
lan2play/docker-php-nginx-base:php8.2 | |
lan2play/docker-php-nginx-base:v4 | |
build-args: | | |
BUILDNODE=GitHub (Run Number: ${{ github.run_number }} Run ID: ${{ github.run_id }}) | |
BUILDID=${{ github.run_id }} | |
BUILDNUMBER=${{ github.run_number }} | |
SOURCE_COMMIT=${{ github.sha }} | |
no-cache: true | |
push: true |