Skip to content

Commit e7fe20c

Browse files
author
Xiaochong Wei
committed
Still build the runtime image when updating the PR, but only publish the image when pushing to our main branch
1 parent 4815351 commit e7fe20c

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/maven-checks.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ jobs:
6161
- name: Clean Maven Output
6262
run: ./mvnw clean -pl '!:presto-server,!:presto-cli,!presto-test-coverage'
6363

64-
presto-coordinator-runtime-image:
64+
presto-coordinator-with-clp-connector-runtime-image:
6565
name: presto-coordinator-runtime-image
6666
needs: maven-checks
6767
runs-on: ubuntu-22.04
68-
if: ${{ always() && success() && github.event_name == 'push' && github.repository == 'y-scope/presto' && github.ref == 'refs/heads/release-0.293-clp-connector' }}
68+
if: ${{ always() && success() }}
6969
steps:
7070
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
7171
with:
@@ -96,11 +96,21 @@ jobs:
9696
mv /tmp/presto-server-0.293.tar.gz ./
9797
mv /tmp/presto-cli-0.293-executable.jar ./
9898
99-
docker buildx create --name container --driver docker-container --use
99+
if [ "${{ github.event_name }}" = "push" ] && \
100+
[ "${{ github.repository }}" = "y-scope/presto" ] && \
101+
[ "${{ github.ref }}" = "refs/heads/release-0.293-clp-connector" ]; then
102+
export PUBLISH=true
103+
else
104+
echo "github.event_name = ${{ github.event_name }}"
105+
echo "github.repository = ${{ github.repository }}"
106+
echo "github.ref = ${{ github.ref }}"
107+
echo "Skip publish the image"
108+
export PUBLISH=false
109+
fi
100110

101-
IMAGE_NAME=coordinator-with-clp-connector \
111+
IMAGE_NAME=coordinator-with-clp-connector-runtime \
102112
REG_ORG=ghcr.io/${{github.actor}}/presto \
103-
PUBLISH=true \
113+
PUBLISH=$PUBLISH \
104114
./build.sh 0.293
105115

106116
rm presto-server-0.293.tar.gz

0 commit comments

Comments
 (0)