-
Notifications
You must be signed in to change notification settings - Fork 4
61 lines (56 loc) · 1.62 KB
/
php-fpm.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
name: Build PHP-FPM
on:
push:
branches:
- master
paths:
- "php-fpm/**"
- ".github/workflows/php-fpm.yml"
- ".github/actions/build-docker-image/**"
pull_request:
paths:
- "php-fpm/**"
- ".github/workflows/php-fpm.yml"
- ".github/actions/build-docker-image/**"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages (PHP ${{ matrix.php.name }})
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
pull-requests: write
security-events: write
strategy:
fail-fast: false
matrix:
php:
- name: "7.4"
suffix: "74"
- name: "8.0"
suffix: "80"
- name: "8.1"
suffix: "81"
- name: "8.2"
suffix: "82"
- name: "8.3"
suffix: "83"
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Build and push image
uses: ./.github/actions/build-docker-image
with:
context: php-fpm
file: php-fpm/Dockerfile.${{ matrix.php.suffix }}
push: ${{ github.base_ref == null }}
cache-from: type=gha,scope=php-fpm-${{ matrix.php.suffix }}
cache-to: type=gha,mode=max,scope=php-fpm-${{ matrix.php.suffix }}
primaryTag: ghcr.io/automattic/vip-container-images/php-fpm:${{ matrix.php.name }}
tags: ghcr.io/automattic/vip-container-images/php-fpm-alt:${{ matrix.php.name }}