@@ -2,8 +2,6 @@ name: OpenMina Docker Build
2
2
on :
3
3
workflow_dispatch : {}
4
4
push :
5
- branches : [ main, develop ]
6
- tags : [ "*" ]
7
5
paths-ignore :
8
6
- " helm/**"
9
7
- " *.md"
54
52
platforms : ${{ matrix.arch.platform }}
55
53
cache-from : type=gha
56
54
cache-to : type=gha,mode=max
57
- outputs : type=image,name=${{ env.REGISTRY_NODE_IMAGE }},push-by-digest=true,name-canonical=true,push=true
55
+ # :warning:
56
+ # Push only if:
57
+ # - main
58
+ # - develop
59
+ # - a tag
60
+ outputs : type=image,name=${{ env.REGISTRY_NODE_IMAGE }},push-by-digest=true,name-canonical=true,push=${{ github.ref_name == 'main' || github.ref_name == 'develop' || startsWith(github.ref, 'refs/tags/') }}
58
61
59
62
- name : Export digest
60
63
run : |
72
75
73
76
merge-openmina-node-image :
74
77
runs-on : ubuntu-latest
78
+ # :warning:
79
+ # Only if:
80
+ # - main
81
+ # - develop
82
+ # - a tag
83
+ if : github.ref_name == 'main' || github.ref_name == 'develop' || startsWith(github.ref, 'refs/tags/')
75
84
needs :
76
85
- build-openmina-node-image
77
86
steps :
@@ -155,7 +164,11 @@ jobs:
155
164
BUILD_CONFIGURATION=${{ matrix.configuration.build_configuration }}
156
165
cache-from : type=gha
157
166
cache-to : type=gha,mode=max
158
- outputs : type=image,name=${{ env.REGISTRY_FRONTEND_IMAGE }},push-by-digest=true,name-canonical=true,push=true
167
+ # Only if:
168
+ # - main
169
+ # - develop
170
+ # - a tag
171
+ outputs : type=image,name=${{ env.REGISTRY_FRONTEND_IMAGE }},push-by-digest=true,name-canonical=true,push=${{ github.ref_name == 'main' || github.ref_name == 'develop' || startsWith(github.ref, 'refs/tags/') }}
159
172
160
173
- name : Export digest
161
174
run : |
@@ -176,11 +189,8 @@ jobs:
176
189
matrix :
177
190
configuration :
178
191
- build_configuration : production
179
- # - build_configuration: compose
180
- # tag_suffix: ""
181
- # - build_configuration: staging
182
- # tag_suffix: ""
183
192
runs-on : ubuntu-latest
193
+ if : github.ref_name == 'main' || github.ref_name == 'develop' || startsWith(github.ref, 'refs/tags/')
184
194
needs :
185
195
- build-openmina-frontend-image
186
196
steps :
@@ -199,9 +209,6 @@ jobs:
199
209
uses : docker/metadata-action@v5
200
210
with :
201
211
images : ${{ env.REGISTRY_FRONTEND_IMAGE }}
202
- # flavor: |
203
- # suffix=${{ matrix.configuration.tag_suffix }},onlatest=true
204
- # generate Docker tags based on the following events/attributes
205
212
tags : |
206
213
type=ref,event=branch
207
214
type=sha,format=short
0 commit comments