This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
forked from mautic/docker-mautic
-
Notifications
You must be signed in to change notification settings - Fork 2
143 lines (134 loc) · 5.24 KB
/
docker-publish.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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: Build and publish docker container image netresearch/mautic
on:
workflow_dispatch:
schedule:
- cron: '38 4 * * *'
push:
branches:
- master
env:
REGISTRY: ghcr.io
IMAGE_NAME: "${{ github.repository_owner }}/mautic"
jobs:
build:
name: Build Mautic ${{ matrix.MAUTIC.version }} for PHP ${{ matrix.PHP.version }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
PHP:
- version: "7.4"
api: 20190902
gpg_keys: 5A52880781F755608BF815FC910DEB46F53EA312 42670A7FE4D0441C8E4632349E4FDC074A4EF02D
- version: "8.0"
api: 20200930
gpg_keys: 1729F83938DA44E27BA0F4D3DBDB397470D12172 BFDDD28642824F8118EF77909B67A5C12229118F
- version: "8.1"
api: 20210902
gpg_keys: 528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544 F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD
MAUTIC:
- version: "4.0.0"
sha1: 6e283b4fbfe484ea85de0f9dcec33473a8827de7
default_php: "7.4"
latest: false
- version: "4.0.1"
sha1: ce29fb17a5bd4ae126866e9bb95542ada212e766
default_php: "7.4"
latest: false
- version: "4.0.2"
sha1: c989ccadf14e8282d7a5e24048e696ad4b4d70ea
default_php: "7.4"
latest: false
- version: "4.1.0"
sha1: 4271e856911fc38641a3b18814d2cb95176527f8
default_php: "7.4"
latest: false
- version: "4.1.1"
sha1: 4a890e9c6fd2151e482aa961363ee17879e150ab
default_php: "7.4"
latest: false
- version: "4.1.2"
sha1: b6eb3cffb9ec559e7ec4caeb335a56d50d85d5cf
default_php: "7.4"
latest: false
- version: "4.2.0"
sha1: 3d9e6e79d60256247890d9e8963826622478d6b1
default_php: "7.4"
latest: false
- version: "4.2.1"
sha1: 112cbe8bcf9eadab123234047e9455d8050fbc2e
default_php: "7.4"
latest: false
- version: "4.2.2"
sha1: c7f15eb2edf0ad60b1cfc16ff9291eb424cac1c4
default_php: "7.4"
latest: false
- version: "4.3.0"
sha1: deeb69551f1bbd499492859eb99df933e8aecd37
default_php: "7.4"
latest: false
- version: "4.3.1"
sha1: 6de39c8e131658a57656adf470fbceeb0451ffa1
default_php: "7.4"
latest: false
- version: "4.4.0"
sha1: 5a19eb5186ae80a4bcff892607581e5569686fbf
default_php: "8.0"
latest: false
- version: "4.4.1"
sha1: 4d130fcf3c7551f3b795f5f6aaef97eb756e5935
default_php: "8.0"
latest: false
- version: "4.4.2"
sha1: 1e8ffd74ecf0fc5412dacf8f67856d089ce09e9d
default_php: "8.0"
latest: true
steps:
- uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Metadata
id: docker-metadata
uses: docker/metadata-action@v3
with:
flavor: |
latest=false
prefix=
suffix=
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# tags:
# 4.0.0-php7.4
# 4.0-php7.4
# 4-php7.4
# 4.0.0
# 4.0
# 4
# latest
tags: |
type=pep440,pattern={{version}},value=${{ matrix.MAUTIC.version }},suffix=-php${{ matrix.PHP.version }}
type=pep440,pattern={{major}}.{{minor}},value=${{ matrix.MAUTIC.version }},suffix=-php${{ matrix.PHP.version }},enable=${{ matrix.MAUTIC.latest }}
type=pep440,pattern={{major}},value=${{ matrix.MAUTIC.version }},suffix=-php${{ matrix.PHP.version }},enable=${{ matrix.MAUTIC.latest }}
type=pep440,pattern={{version}},value=${{ matrix.MAUTIC.version }},enable=${{ matrix.MAUTIC.default_php == matrix.PHP.version }}
type=pep440,pattern={{major}}.{{minor}},value=${{ matrix.MAUTIC.version }},enable=${{ matrix.MAUTIC.latest && matrix.MAUTIC.default_php == matrix.PHP.version }}
type=pep440,pattern={{major}},value=${{ matrix.MAUTIC.version }},enable=${{ matrix.MAUTIC.latest && matrix.MAUTIC.default_php == matrix.PHP.version }}
type=raw,value=latest,enable=${{ matrix.MAUTIC.latest && matrix.MAUTIC.default_php == matrix.PHP.version }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: mautic/
push: true
tags: ${{ steps.docker-metadata.outputs.tags }}
labels: ${{ steps.docker-metadata.outputs.labels }}
build-args: |
MAUTIC_SHA1=${{ matrix.MAUTIC.sha1 }}
MAUTIC_VERSION=${{ matrix.MAUTIC.version }}
PHP_VERSION=${{ matrix.PHP.version }}
PHP_API=${{ matrix.PHP.api }}
PHP_GPG_KEYS=${{ matrix.PHP.gpg_keys }}