-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (37 loc) · 1011 Bytes
/
docker-image.yml
File metadata and controls
47 lines (37 loc) · 1011 Bytes
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
name: Docker Image CI
on:
push:
branches:
- main
env:
LATEST_VERSION: "8.5.1"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- "8.0.30"
- "8.1.34"
- "8.2.29"
- "8.3.29"
- "8.4.16"
- "8.5.1"
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
context: .
push: true
build-args: |
PHP_VERSION=${{ matrix.version }}
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/php-extension-dev:${{ matrix.version }}
${{ matrix.version == env.LATEST_VERSION && format('{0}/php-extension-dev:latest', secrets.DOCKERHUB_USERNAME) || '' }}