-
Notifications
You must be signed in to change notification settings - Fork 105
100 lines (89 loc) · 3.59 KB
/
Copy pathtest.8.yml
File metadata and controls
100 lines (89 loc) · 3.59 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Test PHP 8 images
on:
schedule:
# chosen by fair dice roll
- cron: '42 18 * * 3'
push:
branches: [main]
pull_request:
types: [opened, synchronize]
jobs:
test-8:
name: Build and test PHP 8 images
runs-on: ubuntu-latest
if: ${{ !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
strategy:
matrix:
version: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_PULL_USER_3 }}
password: ${{ secrets.DOCKER_PULL_PASS_3 }}
- name: Build image for testing
uses: docker/build-push-action@v5
with:
# cache-from: type=registry,ref=ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
cache-to: type=inline
context: .
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
build-args: |
BASE_IMAGE=php:${{ matrix.version }}${{ matrix.flavor }}
tags: localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Test image
env:
REGISTRY: localhost:5000/
VERSION: ${{ matrix.version }}${{ matrix.flavor }}
run: 'docker pull localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }} && make test'
- name: Build dev image for testing
uses: docker/build-push-action@v5
with:
cache-to: type=inline
context: ./dev
build-args: |
BASE_IMAGE=localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: localhost:5000/chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Test dev image
env:
REGISTRY: localhost:5000/
VERSION: ${{ matrix.version }}${{ matrix.flavor }}
run: 'docker pull localhost:5000/chialab/php-dev:${{ matrix.version }}${{ matrix.flavor }} && make -C dev test'
- name: Build PCOV image for testing
uses: docker/build-push-action@v5
with:
cache-to: type=inline
context: ./pcov
build-args: |
BASE_IMAGE=localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: localhost:5000/chialab/php-pcov:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Test PCOV image
env:
REGISTRY: localhost:5000/
VERSION: ${{ matrix.version }}${{ matrix.flavor }}
run: 'docker pull localhost:5000/chialab/php-pcov:${{ matrix.version }}${{ matrix.flavor }} && make -C pcov test'
- name: Build xhprof image for testing
uses: docker/build-push-action@v5
with:
cache-to: type=inline
context: ./xhprof
build-args: |
BASE_IMAGE=localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
tags: localhost:5000/chialab/php-xhprof:${{ matrix.version }}${{ matrix.flavor }}
push: true
- name: Test xhprof image
env:
REGISTRY: localhost:5000/
VERSION: ${{ matrix.version }}${{ matrix.flavor }}
run: 'docker pull localhost:5000/chialab/php-xhprof:${{ matrix.version }}${{ matrix.flavor }} && make -C xhprof test'