Skip to content

Commit 7133e92

Browse files
authored
Update presto-release-publish-native.yml
1 parent d1168e0 commit 7133e92

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/presto-release-publish-native.yml

+16-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
type: boolean
1212
default: true
1313
required: false
14+
dependency_image:
15+
description: 'Dependency image(e.g., prestodb/presto-native-dependency:0.290-20241014120930-e1fc090)'
16+
required: false
17+
default: ''
1418

1519
env:
1620
VERSION: ${{ github.event.inputs.version }}
@@ -49,12 +53,22 @@ jobs:
4953
username: ${{ github.actor }}
5054
password: ${{ secrets.GITHUB_TOKEN }}
5155

56+
- name: Set dependency image tag
57+
run: |
58+
if [[ -n "${{ github.event.inputs.dependency_image }}" ]]; then
59+
echo "DEPENDENCY_IMAGE=${{ github.event.inputs.dependency_image }}" >> $GITHUB_ENV
60+
else
61+
echo "DEPENDENCY_IMAGE=ghcr.io/${{ github.repository_owner }}/presto-native-dependency:${{ env.VERSION }}-${{ env.COMMIT_SHA }}" >> $GITHUB_ENV
62+
fi
63+
5264
- name: Build Dependency Image
5365
working-directory: presto-native-execution
5466
run: |
55-
if docker pull ghcr.io/${{ github.repository_owner }}/presto-native-dependency:${{ env.VERSION }}-${{ env.COMMIT_SHA }}; then
56-
docker tag ghcr.io/${{ github.repository_owner }}/presto-native-dependency:${{ env.VERSION }}-${{ env.COMMIT_SHA }} prestissimo-centos-native-dependency:latest
67+
if docker pull ${{ env.DEPENDENCY_IMAGE }}; then
68+
echo "Using dependency image ${{ env.DEPENDENCY_IMAGE }}"
69+
docker tag ${{ env.DEPENDENCY_IMAGE }} prestissimo-centos-native-dependency:latest
5770
else
71+
echo "Building new depedency image"
5872
docker compose build centos-native-dependency
5973
docker tag prestissimo-centos-native-dependency:latest ghcr.io/${{ github.repository_owner }}/presto-native-dependency:${{ env.VERSION }}-${{ env.COMMIT_SHA }}
6074
docker push ghcr.io/${{ github.repository_owner }}/presto-native-dependency:${{ env.VERSION }}-${{ env.COMMIT_SHA }}

0 commit comments

Comments
 (0)