Skip to content

Commit df29872

Browse files
Merge branch 'trial-testing:main' into main
2 parents 4a36e8d + 059115a commit df29872

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/auth_try.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)