Skip to content

Commit e34e3a9

Browse files
author
Xiaochong Wei
committed
Build worker image
1 parent e7fe20c commit e34e3a9

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: prestocpp-worker-with-clp-connector-runtime-image-build
2+
3+
on:
4+
# TODO: specifiy the branch to the release-0.293 when finalize the PR
5+
push:
6+
7+
jobs:
8+
prestocpp-worker-with-clp-connector-runtime-image:
9+
name: prestocpp-worker-with-clp-connector-runtime-image
10+
runs-on: ubuntu-22.04
11+
steps:
12+
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
13+
with:
14+
submodules: "recursive"
15+
16+
- name: "Login to Image Registry"
17+
uses: "docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772"
18+
with:
19+
registry: ghcr.io
20+
username: ${{github.actor}}
21+
password: ${{secrets.GITHUB_TOKEN}}
22+
23+
- name: "Build worker image"
24+
working-directory: ./presto-native-execution
25+
run: |
26+
sed -i 's|image: presto/prestissimo-runtime:ubuntu-22.04|image: ghcr.io/${{github.actor}}/presto/prestissimo-with-clp-connector-runtime:ubuntu-22.04|' docker-compose.yml
27+
docker compose ubuntu-native-dependency
28+
docker compose ubuntu-native-runtime
29+
30+
mv /tmp/presto-server-0.293.tar.gz ./
31+
mv /tmp/presto-cli-0.293-executable.jar ./
32+
33+
if [ "${{ github.event_name }}" = "push" ] && \
34+
[ "${{ github.repository }}" = "y-scope/presto" ] && \
35+
[ "${{ github.ref }}" = "refs/heads/release-0.293-clp-connector" ]; then
36+
docker push "ghcr.io/${{github.actor}}/presto/prestissimo-with-clp-connector-runtime:ubuntu-22.04"
37+
else
38+
echo "github.event_name = ${{ github.event_name }}"
39+
echo "github.repository = ${{ github.repository }}"
40+
echo "github.ref = ${{ github.ref }}"
41+
echo "Skip publish the image"
42+
fi

0 commit comments

Comments
 (0)