You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by yu...@apache.org on 2024/08/14 12:14:59 UTC
(gravitino) 01/05: [#4445] feat(docker): Publish Docker image to Apache official DockerHub account
This is an automated email from the ASF dual-hosted git repository.
yuqi4733 pushed a commit to branch issue-4445_for_test
in repository https://gitbox.apache.org/repos/asf/gravitino.git
commit 8160b7f3bc7662a89d91da62d86b31dca42ea247
Author: xunliu <li...@apache.org>
AuthorDate: Thu Aug 8 18:43:36 2024 +0800
[#4445] feat(docker): Publish Docker image to Apache official DockerHub account
---
.github/workflows/docker-image.yml | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
index 1993a209a..c8d63f0af 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -15,11 +15,11 @@ on:
- 'gravitino-ci-trino'
- 'gravitino-ci-doris'
- 'gravitino-ci-ranger'
- - 'trino'
- - 'hive'
- - 'ranger'
- tag:
- description: 'Docker tag to apply to this image'
+ - 'gravitino-playground-trino'
+ - 'gravitino-playground-hive'
+ - 'gravitino-playground-ranger'
+ version:
+ description: 'Docker version to apply to this image'
required: true
type: string
token:
@@ -39,31 +39,31 @@ jobs:
run: |
if [ "${{ github.event.inputs.image }}" == "gravitino-ci-hive" ]; then
echo "image_type=hive" >> $GITHUB_ENV
- echo "image_name=datastrato/gravitino-ci-hive" >> $GITHUB_ENV
+ echo "tag_name=ci-hive-" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-ci-kerberos-hive" ]; then
echo "image_type=kerberos-hive" >> $GITHUB_ENV
- echo "image_name=datastrato/gravitino-ci-kerberos-hive" >> $GITHUB_ENV
+ echo "tag_name=ci-kerberos-hive-" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-ci-trino" ]; then
echo "image_type=trino" >> $GITHUB_ENV
- echo "image_name=datastrato/gravitino-ci-trino" >> $GITHUB_ENV
+ echo "tag_name=ci-trino-" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-ci-doris" ]; then
echo "image_type=doris" >> $GITHUB_ENV
- echo "image_name=datastrato/gravitino-ci-doris" >> $GITHUB_ENV
+ echo "tag_name=ci-doris-" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino-ci-ranger" ]; then
echo "image_type=ranger" >> $GITHUB_ENV
- echo "image_name=datastrato/gravitino-ci-ranger" >> $GITHUB_ENV
+ echo "tag_name=ci-ranger-" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.image }}" == "gravitino" ]; then
echo "image_type=gravitino" >> $GITHUB_ENV
- echo "image_name=datastrato/gravitino" >> $GITHUB_ENV
- elif [ "${{ github.event.inputs.image }}" == "trino" ]; then
+ # `apache/gravitino` is the default image name, didn't need to tag name
+ elif [ "${{ github.event.inputs.image }}" == "gravitino-playground-trino" ]; then
echo "image_type=trino" >> $GITHUB_ENV
- echo "image_name=datastrato/trino" >> $GITHUB_ENV
- elif [ "${{ github.event.inputs.image }}" == "hive" ]; then
+ echo "tag_name=playground-trino-" >> $GITHUB_ENV
+ elif [ "${{ github.event.inputs.image }}" == "gravitino-playground-hive" ]; then
echo "image_type=hive" >> $GITHUB_ENV
- echo "image_name=datastrato/hive" >> $GITHUB_ENV
- elif [ "${{ github.event.inputs.image }}" == "ranger" ]; then
+ echo "tag_name=playground-hive-" >> $GITHUB_ENV
+ elif [ "${{ github.event.inputs.image }}" == "gravitino-playground-ranger" ]; then
echo "image_type=ranger" >> $GITHUB_ENV
- echo "image_name=datastrato/ranger" >> $GITHUB_ENV
+ echo "tag_name=playground-ranger-" >> $GITHUB_ENV
fi
- name: Check publish Docker token
@@ -79,7 +79,7 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
- username: datastrato
+ username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }}
password: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
- name: Set up Docker Buildx
@@ -96,4 +96,4 @@ jobs:
run: |
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
- ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${{ github.event.inputs.tag }} --latest
+ ./dev/docker/build-docker.sh --platform all --type ${image_type} --image apache/gravitino --tag ${tag_name}${{ github.event.inputs.version }} --latest