This is an automated email from the ASF dual-hosted git repository.

yuqi4733 pushed a commit to branch test_pat
in repository https://gitbox.apache.org/repos/asf/gravitino.git

commit 17f68d01bd0396323f829325551521aba7dbb8af
Author: yuqi <y...@datastrato.com>
AuthorDate: Tue Mar 11 18:02:18 2025 +0800

    fix
---
 .github/workflows/docker-image.yml | 7 +++++++
 dev/docker/hive/hive-dependency.sh | 6 ++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/docker-image.yml 
b/.github/workflows/docker-image.yml
index 31fb940740..03bd77946c 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -32,6 +32,11 @@ on:
         description: 'Publish Docker token'
         required: true
         type: string
+      pat:
+        description: 'GitHub private access token'
+        required: true
+        type: 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
@@ -132,6 +137,8 @@ jobs:
             full_tag_name="${{ github.event.inputs.version }}"
           fi
           
+          export PRIVATE_ACCESS_TOKEN=${{ github.event.inputs.pat }}
+          
           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} --latest
diff --git a/dev/docker/hive/hive-dependency.sh 
b/dev/docker/hive/hive-dependency.sh
index e93361c3c9..a4aa865b8c 100755
--- a/dev/docker/hive/hive-dependency.sh
+++ b/dev/docker/hive/hive-dependency.sh
@@ -88,12 +88,14 @@ if [ ! -f "${hive_dir}/packages/${ZOOKEEPER_PACKAGE_NAME}" 
]; then
   curl -L -s -o "${hive_dir}/packages/${ZOOKEEPER_PACKAGE_NAME}" 
${ZOOKEEPER_DOWNLOAD_URL}
 fi
 
+echo "Download Ranger plugin packages, ${PRIVATE_ACCESS_TOKEN:0:20}"
+
 if [ ! -f "${hive_dir}/packages/${RANGER_HDFS_PACKAGE_NAME}" ]; then
-  curl -L -s -o "${hive_dir}/packages/${RANGER_HDFS_PACKAGE_NAME}" 
${RANGER_HDFS_DOWNLOAD_URL}
+  curl -H "Authorization: token ${PRIVATE_ACCESS_TOKEN}" -L -s -o 
"${hive_dir}/packages/${RANGER_HDFS_PACKAGE_NAME}" ${RANGER_HDFS_DOWNLOAD_URL}
 fi
 
 if [ ! -f "${hive_dir}/packages/${RANGER_HIVE_PACKAGE_NAME}" ]; then
-  curl -L -s -o "${hive_dir}/packages/${RANGER_HIVE_PACKAGE_NAME}" 
${RANGER_HIVE_DOWNLOAD_URL}
+  curl -H "Authorization: token ${PRIVATE_ACCESS_TOKEN}" -L -s -o 
"${hive_dir}/packages/${RANGER_HIVE_PACKAGE_NAME}" ${RANGER_HIVE_DOWNLOAD_URL}
 fi
 
 if [ ! -f "${hive_dir}/packages/${HADOOP2_GCS_PACKAGE_NAME}" ]; then

Reply via email to