update readme and update the workflow to not run on readme or dependa… #133
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.3 | |
paths-ignore: | |
- README.md | |
- .github/workflows/dependabot.yml | |
pull_request: | |
branches: | |
- php8.3 | |
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.3' || github.base_ref == 'php8.3' }} | |
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@v3 | |
- 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.3 Linux Image | |
if: ${{ github.event_name == 'pull_request' && (github.ref_name == 'php8.3' || github.base_ref == 'php8.3') }} | |
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.3 | |
lan2play/docker-php-nginx-base:v5 | |
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.3 Linux Image | |
if: ${{ github.event_name != 'pull_request' && (github.ref_name == 'php8.3' || github.base_ref == 'php8.3') }} | |
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.3 | |
lan2play/docker-php-nginx-base:v5 | |
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 |