Skip to content

Commit bf86445

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

File tree

1 file changed

+43
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)