World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#6300] fix(workflow): add an flag to control whether update docker latest tag. (#6318)
FANNG5c9685cbd07c
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.ymlindex e5f1f699de..337504170c 100644--- a/.github/workflows/docker-image.yml+++ b/.github/workflows/docker-image.yml@@ -32,6 +32,11 @@ on:description: 'Publish Docker token'required: truetype: string+ publish-latest-tag:+ description: 'Whether to update the latest tag. This operation is only applicable to official releases and should not be used for Release Candidate (RC).'+ required: false+ type: boolean+ default: falsejobs:publish-docker-image:@@ -83,6 +88,12 @@ jobs:echo "image_type=iceberg-rest-server" >> $GITHUB_ENVecho "image_name=apache/gravitino-iceberg-rest" >> $GITHUB_ENVfi++ if [ "${{ github.event.inputs.publish-latest-tag }}" == "true" ]; then+ echo "publish_latest=true" >> $GITHUB_ENV+ else+ echo "publish_latest=false" >> $GITHUB_ENV+ fi- name: Check publish Docker tokenrun: |@@ -115,8 +126,16 @@ jobs:sudo rm -rf /usr/local/lib/androidsudo rm -rf /opt/hostedtoolcache/CodeQL- if [[ "${image_type}" == "gravitino" || "${image_type}" == "iceberg-rest-server" ]]; then- ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${{ github.event.inputs.version }} --latest+ if [[ -n "${tag_name}" ]]; then+ full_tag_name="${tag_name}-${{ github.event.inputs.version }}"+ else+ full_tag_name="${{ github.event.inputs.version }}"+ fi++ if [[ "${publish_latest}" == "true" ]]; then+ echo "Publish tag ${full_tag_name}, and update latest too."+ ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${full_tag_name} --latestelse- ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag "${tag_name}-${{ github.event.inputs.version }}"- fi\ No newline at end of file+ echo "Publish tag ${full_tag_name}."+ ./dev/docker/build-docker.sh --platform all --type ${image_type} --image ${image_name} --tag ${full_tag_name}+ fidiff --git a/docs/assets/publish-docker-image.jpg b/docs/assets/publish-docker-image.jpgdeleted file mode 100644index ca22da1db9..0000000000Binary files a/docs/assets/publish-docker-image.jpg and /dev/null differdiff --git a/docs/assets/publish-docker-image.png b/docs/assets/publish-docker-image.pngnew file mode 100644index 0000000000..8085d2dc7dBinary files /dev/null and b/docs/assets/publish-docker-image.png differdiff --git a/docs/publish-docker-images.md b/docs/publish-docker-images.mdindex 953d312066..d4590205ce 100644--- a/docs/publish-docker-images.md+++ b/docs/publish-docker-images.md@@ -30,9 +30,10 @@ You can use GitHub actions to publish Docker images to the Docker Hub repository3. `apache/gravitino:0.1.0` if this is a gravitino server image.4. `apache/gravitino-iceberg-rest:0.1.0` if this is an iceberg-rest server image.6. You must enter the correct `docker user name`and `publish docker token` before you can execute run `Publish Docker Image` workflow.-7. Wait for the workflow to complete. You can see a new Docker image shown in the [Apache Docker Hub](https://hub.docker.com/u/apache) repository.+7. If you want to update the latest tag, select the box for `Whether to update the latest tag`.+8. Wait for the workflow to complete. You can see a new Docker image shown in the [Apache Docker Hub](https://hub.docker.com/u/apache) repository.-+## More details of Apache Gravitino Docker images