3030 tags : |
3131 type=raw,value=ubuntu-22.04
3232
33- - name : " Build and push"
33+ - name : " Update Metadata for Runtime Image"
34+ id : " meta-runtime"
35+ uses : " docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804"
36+ with :
37+ images : >-
38+ ghcr.io/${{github.repository}}/prestissimo-with-clp-connector-runtime
39+ tags : |
40+ type=raw,value=ubuntu-22.04
41+
42+ - name : Check for dependency changes in presto-native-execution
43+ id : dependency-changes
44+ run : |
45+ git fetch origin ${{ github.event.before }} --depth=1 || true
46+ dep_changed=false
47+ if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q '^presto-native-execution/scripts'; then
48+ dep_changed=true
49+ fi
50+ cd presto-native-execution/velox
51+ if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q '^scripts'; then
52+ dep_changed=true
53+ fi
54+ echo "dep-changed=${dep_changed}" >> $GITHUB_OUTPUT
55+
56+ - name : " Build and push dependency image"
57+ if : steps.dependency-changes.outputs.dep-changed == 'true'
3458 uses : " docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4"
3559 with :
3660 context : " ./presto-native-execution/"
@@ -41,20 +65,16 @@ jobs:
4165 tags : " ${{steps.meta-dependency.outputs.tags}}"
4266 labels : " ${{steps.meta-dependency.outputs.labels}}"
4367
44- - name : " Update Metadata for Runtime Image"
45- id : " meta-runtime"
46- uses : " docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804"
47- with :
48- images : >-
49- ghcr.io/${{github.repository}}/prestissimo-with-clp-connector-runtime
50- tags : |
51- type=raw,value=ubuntu-22.04
68+ - name : Get number of CPU
69+ id : get-cores
70+ run : |
71+ echo "num-threads=$(nproc)" >> $GITHUB_OUTPUT
5272
53- - name : " Build and push"
73+ - name : " Build and push runtime image "
5474 uses : " docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4"
5575 with :
5676 build-args : |-
57- NUM_THREADS=4
77+ NUM_THREADS=${{ steps.get-cores.outputs.num-threads }}
5878 DEPENDENCY_IMAGE=${{ steps.meta-dependency.outputs.tags }}
5979 BASE_IMAGE=ubuntu:22.04
6080 OSNAME=ubuntu
0 commit comments