forked from spryker/docker-php
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.88 KB
/
ci.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
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
## Alpine
### Alpine 3.18
- image: "alpine/3.18/8.1/Dockerfile"
tags: [ "loeffelhardt/php:8.1", "loeffelhardt/php:8.1-alpine3.18" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.18/8.2/Dockerfile"
tags: [ "loeffelhardt/php:latest", "loeffelhardt/php:8.2", "loeffelhardt/php:8.2-alpine3.18" ]
platforms: [ "linux/amd64", "linux/arm64" ]
### Alpine 3.19
- image: "alpine/3.19/8.1/Dockerfile"
tags: [ "loeffelhardt/php:8.1-alpine3.19" ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: "alpine/3.19/8.2/Dockerfile"
tags: [ "loeffelhardt/php:8.2-alpine3.19" ]
platforms: [ "linux/amd64", "linux/arm64" ]
## Debian
### Debian bullseye
- image: 'debian/bullseye/8.1/Dockerfile'
tags: [ 'loeffelhardt/php:8.1-debian' ]
platforms: [ "linux/amd64", "linux/arm64" ]
- image: 'debian/bullseye/8.2/Dockerfile'
tags: [ 'loeffelhardt/php:8.2-debian' ]
platforms: [ "linux/amd64", "linux/arm64" ]
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
push: ${{ github.ref == 'refs/heads/main' }}
file: ${{ matrix.image }}
tags: ${{ join(matrix.tags) }}
platforms: ${{ join(matrix.platforms) }}