-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (66 loc) · 2.44 KB
/
test_and_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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