-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (58 loc) · 2.17 KB
/
Copy pathdocker.yml
File metadata and controls
63 lines (58 loc) · 2.17 KB
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
name: Docker
on:
workflow_call:
jobs:
build:
strategy:
matrix:
include:
- php_version: 8.5
latest: true
- php_version: 8.4
latest: false
- php_version: 8.3
latest: false
env:
debian_version: trixie
postgresql_version: "18"
composer_version: "2.9.5"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Build the base image
uses: tweedegolf/build-container-image@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
context: "${{ matrix.php_version }}"
file: "${{ matrix.php_version }}/Dockerfile"
push: ${{ github.ref == 'refs/heads/main' }}
platforms: "linux/amd64,linux/arm64"
build-args: |
DEBIAN_VERSION=${{ env.debian_version }}
POSTGRESQL_VERSION=${{ env.postgresql_version }}
COMPOSER_VERSION=${{ env.composer_version }}
tags: |
ghcr.io/tweedegolf/php:${{matrix.php_version}}
${{ matrix.latest && 'ghcr.io/tweedegolf/php:latest' || '' }}
- name: Build the development image
uses: tweedegolf/build-container-image@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
context: "${{ matrix.php_version }}"
file: "${{ matrix.php_version }}/Dockerfile.dev"
push: ${{ github.ref == 'refs/heads/main' }}
platforms: "linux/amd64,linux/arm64"
tags: |
ghcr.io/tweedegolf/php:${{matrix.php_version}}-dev
${{ matrix.latest && 'ghcr.io/tweedegolf/php:latest-dev' || '' }}
- name: Build the debugging image
uses: tweedegolf/build-container-image@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
context: "${{ matrix.php_version }}"
file: "${{ matrix.php_version }}/Dockerfile.debug"
push: ${{ github.ref == 'refs/heads/main' }}
platforms: "linux/amd64,linux/arm64"
tags: |
ghcr.io/tweedegolf/php:${{matrix.php_version}}-debug
${{ matrix.latest && 'ghcr.io/tweedegolf/php:latest-debug' || '' }}