File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -57,16 +57,19 @@ jobs:
5757
5858 echo "JSON_PAYLOAD_PATH=files_payload.json" >> $GITHUB_ENV
5959
60- - name : 🔐 Request OIDC Token from GitHub
61- id : oidc
62- uses : actions/github-script@v6
63- with :
64- script : |
65- console.log("🌐 Getting OIDC token with audience: api://" + process.env.CLIENT_ID);
66- const idToken = await core.getIDToken("api://" + process.env.CLIENT_ID);
67- core.setOutput("token", idToken);
68- console.log("✅ OIDC token acquired.");
69-
60+ - name : 🔐 Request OIDC token from GitHub
61+ id : fetch_token
62+ run : |
63+ echo "🌐 Requesting OIDC token..."
64+ raw=$(curl -s \
65+ -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
66+ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=api://${CLIENT_ID}")
67+ echo "🔁 Raw token response JSON: $raw"
68+ token=$(echo "$raw" | jq -r '.value')
69+ echo "✔️ Token length: ${#token}"
70+ echo "TOKEN=$token" >> $GITHUB_ENV
71+
72+
7073 - name : 🧪 Debug OIDC Token (first 50 chars)
7174 run : |
7275 echo "🔑 Partial token: ${{ steps.oidc.outputs.token }}" | cut -c1-50
You can’t perform that action at this time.
0 commit comments