7373 - name : Checkout ADBC
7474 uses : actions/checkout@v4
7575 with :
76- ref : ${{ github.event.pull_request.head.sha }}
76+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
7777 fetch-depth : 0
7878 submodules : recursive
7979 - name : Build
9494 DATABRICKS_DIR="$HOME/.databricks"
9595 DATABRICKS_CONFIG_FILE="$HOME/.databricks/connection.json"
9696 fi
97-
98- # Get GitHub OIDC token
99- echo "Getting GitHub OIDC token..."
100- echo "ACTIONS_ID_TOKEN_REQUEST_URL: '$ACTIONS_ID_TOKEN_REQUEST_URL'"
101-
102- # Construct the full URL for the OIDC token request
103- OIDC_TOKEN_URL="${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=https://github.com/apache"
104- echo "Full OIDC token URL: '$OIDC_TOKEN_URL'"
105-
106- # Test the URL format
107- if [[ "$OIDC_TOKEN_URL" =~ ^https?:// ]]; then
108- echo "OIDC URL format appears valid (starts with http/https)"
109- else
110- echo "WARNING: OIDC URL format may be invalid - doesn't start with http/https"
111- fi
11297
11398 # Get GitHub OIDC token
11499 GITHUB_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
@@ -119,13 +104,8 @@ jobs:
119104 exit 1
120105 fi
121106
122- # Debug the URL construction
123- echo "DATABRICKS_WORKSPACE_URL: '$DATABRICKS_WORKSPACE_URL'"
124- TOKEN_URL="https://$DATABRICKS_WORKSPACE_URL/oidc/v1/token"
125- echo "Constructed token URL: '$TOKEN_URL'"
126-
127107 # Exchange OIDC token for Databricks OAuth token
128- OAUTH_RESPONSE=$(curl -X POST "$TOKEN_URL " \
108+ OAUTH_RESPONSE=$(curl -X POST "https://$DATABRICKS_WORKSPACE_URL/oidc/v1/token " \
129109 -H "Content-Type: application/x-www-form-urlencoded" \
130110 -d "grant_type=urn:ietf:params:oauth:grant-type:token-exchange" \
131111 -d "client_id=$DATABRICKS_SP_CLIENT_ID" \
@@ -141,7 +121,7 @@ jobs:
141121 exit 1
142122 fi
143123
144- # Create Databricks configuration file - use variables instead of hardcoded paths
124+ # Create Databricks configuration file
145125 mkdir -p "$DATABRICKS_DIR"
146126 cat > "$DATABRICKS_CONFIG_FILE" << EOF
147127 {
0 commit comments