6
6
RELEASE_VERSION :
7
7
description : ' Release version (e.g., 0.290)'
8
8
required : true
9
- publish_as_latest :
10
- description : ' Also publish as latest version'
9
+ publish_maven :
10
+ description : ' Publish Maven artifacts'
11
+ type : boolean
12
+ default : true
13
+ required : false
14
+ publish_docker :
15
+ description : ' Publish Docker images'
16
+ type : boolean
17
+ default : true
18
+ required : false
19
+ publish_native_docker :
20
+ description : ' Publish Native Docker images'
21
+ type : boolean
22
+ default : true
23
+ required : false
24
+ tag_image_as_latest :
25
+ description : ' Tag the image as latest version'
11
26
type : boolean
12
27
default : true
13
28
required : false
14
29
dependency_image :
15
30
description : ' Dependency image(e.g., prestodb/presto-native-dependency:0.290-20241014120930-e1fc090)'
16
31
required : false
17
32
default : ' '
33
+
18
34
env :
19
35
VERSION : ${{ github.event.inputs.RELEASE_VERSION }}
20
36
DOCKER_REPO : ${{ github.repository }}
49
65
presto-cli/target/presto-cli-*-executable.jar
50
66
51
67
publish-maven-artifacts :
68
+ if : ${{ github.event.inputs.publish_maven == 'true' }}
52
69
runs-on : ubuntu-latest
53
70
environment : release
54
71
timeout-minutes : 30
@@ -156,6 +173,7 @@ jobs:
156
173
presto-cli/target/presto-cli-*-executable.jar
157
174
158
175
publish-docker-images :
176
+ if : ${{ github.event.inputs.publish_docker == 'true' }}
159
177
needs : [maven-build]
160
178
runs-on : ubuntu-latest
161
179
environment : release
@@ -215,11 +233,12 @@ jobs:
215
233
JMX_PROMETHEUS_JAVAAGENT_VERSION=0.20.0
216
234
tags : |
217
235
${{ env.DOCKER_REPO }}:${{ env.VERSION }}
218
- ${{ github.event.inputs.publish_as_latest == 'true' && format('{0}:latest', env.DOCKER_REPO) || '' }}
236
+ ${{ github.event.inputs.tag_image_as_latest == 'true' && format('{0}:latest', env.DOCKER_REPO) || '' }}
219
237
ghcr.io/${{ github.repository }}:${{ env.VERSION }}
220
- ${{ github.event.inputs.publish_as_latest == 'true' && format('ghcr.io/{0}:latest', github.repository) || '' }}
238
+ ${{ github.event.inputs.tag_image_as_latest == 'true' && format('ghcr.io/{0}:latest', github.repository) || '' }}
221
239
222
240
publish-native-image :
241
+ if : ${{ github.event.inputs.publish_native_docker == 'true' }}
223
242
needs : [maven-build]
224
243
runs-on : ubuntu-latest
225
244
permissions :
@@ -290,14 +309,14 @@ jobs:
290
309
working-directory : presto-native-execution
291
310
run : |
292
311
docker tag presto/prestissimo-runtime:centos9 ${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
293
- if [[ "${{ github.event.inputs.publish_as_latest }}" == "true" ]]; then
312
+ if [[ "${{ github.event.inputs.tag_image_as_latest }}" == "true" ]]; then
294
313
docker tag presto/prestissimo-runtime:centos9 ${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}:latest
295
314
fi
296
315
297
316
- name : Push to DockerHub
298
317
run : |
299
318
docker push ${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
300
- if [[ "${{ github.event.inputs.publish_as_latest }}" == "true" ]]; then
319
+ if [[ "${{ github.event.inputs.tag_image_as_latest }}" == "true" ]]; then
301
320
docker tag ${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} ${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}:latest
302
321
docker push ${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}:latest
303
322
fi
@@ -306,7 +325,7 @@ jobs:
306
325
run : |
307
326
docker tag ${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
308
327
docker push ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
309
- if [[ "${{ github.event.inputs.publish_as_latest }}" == "true" ]]; then
328
+ if [[ "${{ github.event.inputs.tag_image_as_latest }}" == "true" ]]; then
310
329
docker tag ${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
311
330
docker push ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
312
331
fi
0 commit comments