4
4
release :
5
5
types : [published]
6
6
7
+ env :
8
+ REGISTRY : docker.io
9
+ IMAGE_NAME : espocrm/espocrm
10
+
7
11
jobs :
8
12
dockerhub :
9
13
runs-on : ubuntu-latest
14
+
10
15
steps :
11
- -
12
- name : Checkout
16
+ - name : Checkout
13
17
uses : actions/checkout@v3
14
- -
15
- name : Set up QEMU
16
- uses : docker/setup-qemu-action@v2
17
- -
18
- name : Set up Docker Buildx
19
- uses : docker/setup-buildx-action@v2
20
- -
21
- name : Login to DockerHub
22
- uses : docker/login-action@v2
18
+
19
+ - name : Set up Docker Buildx
20
+ uses : docker/setup-buildx-action@v3
21
+
22
+ - name : Authenticate to registry ${{ env.REGISTRY }}
23
+ uses : docker/login-action@v3
23
24
with :
25
+ registry : ${{ env.REGISTRY }}
24
26
username : ${{ secrets.DOCKERHUB_USERNAME }}
25
27
password : ${{ secrets.DOCKERHUB_TOKEN }}
26
- -
27
- name : Get Version
28
+
29
+ - name : Extract Docker metadata
30
+ id : meta
31
+ uses : docker/metadata-action@v5
32
+ with :
33
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
34
+
35
+ - name : Get Version
28
36
id : get_version
29
37
uses : battila7/get-version-action@v2
30
- -
31
- name : apache
32
- uses : docker/build-push-action@v4
38
+
39
+ - name : Apache Build
40
+ uses : docker/build-push-action@v6
33
41
with :
34
42
context : ./apache
35
43
platforms : linux/386,linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
36
44
push : true
45
+ labels : ${{ steps.meta.outputs.labels }}
37
46
tags : |
38
47
espocrm/espocrm:latest
39
48
espocrm/espocrm:${{ steps.get_version.outputs.version }}
@@ -43,27 +52,62 @@ jobs:
43
52
espocrm/espocrm:${{ steps.get_version.outputs.version }}-apache
44
53
espocrm/espocrm:${{ steps.get_version.outputs.major }}.${{ steps.get_version.outputs.minor }}-apache
45
54
espocrm/espocrm:${{ steps.get_version.outputs.major }}-apache
46
- -
47
- name : fpm
55
+ cache-from : type=gha
56
+ cache-to : type=gha,mode=max
57
+
58
+ - name : Apache Docker Scout
59
+ id : apache-scout
60
+ uses : docker/scout-action@v1
61
+ with :
62
+ command : cves
63
+ image : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:apache
64
+ ignore-unchanged : true
65
+ only-severities : critical,high
66
+
67
+ - name : FPM Build
48
68
uses : docker/build-push-action@v4
49
69
with :
50
70
context : ./fpm
51
71
platforms : linux/386,linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
52
72
push : true
73
+ labels : ${{ steps.meta.outputs.labels }}
53
74
tags : |
54
75
espocrm/espocrm:fpm
55
76
espocrm/espocrm:${{ steps.get_version.outputs.version }}-fpm
56
77
espocrm/espocrm:${{ steps.get_version.outputs.major }}.${{ steps.get_version.outputs.minor }}-fpm
57
78
espocrm/espocrm:${{ steps.get_version.outputs.major }}-fpm
58
- -
59
- name : fpm-alpine
79
+ cache-from : type=gha
80
+ cache-to : type=gha,mode=max
81
+
82
+ - name : FPM Docker Scout
83
+ id : fpm-scout
84
+ uses : docker/scout-action@v1
85
+ with :
86
+ command : cves
87
+ image : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:fpm
88
+ ignore-unchanged : true
89
+ only-severities : critical,high
90
+
91
+ - name : FPM-Alpine Build
60
92
uses : docker/build-push-action@v4
61
93
with :
62
94
context : ./fpm-alpine
63
95
platforms : linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
64
96
push : true
97
+ labels : ${{ steps.meta.outputs.labels }}
65
98
tags : |
66
99
espocrm/espocrm:fpm-alpine
67
100
espocrm/espocrm:${{ steps.get_version.outputs.version }}-fpm-alpine
68
101
espocrm/espocrm:${{ steps.get_version.outputs.major }}.${{ steps.get_version.outputs.minor }}-fpm-alpine
69
102
espocrm/espocrm:${{ steps.get_version.outputs.major }}-fpm-alpine
103
+ cache-from : type=gha
104
+ cache-to : type=gha,mode=max
105
+
106
+ - name : FPM Alpine Docker Scout
107
+ id : fpm-alpine-scout
108
+ uses : docker/scout-action@v1
109
+ with :
110
+ command : cves
111
+ image : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:fpm-alpine
112
+ ignore-unchanged : true
113
+ only-severities : critical,high
0 commit comments