Skip to content

Commit 88f8465

Browse files
Merge branch 'trial-testing:main' into main
2 parents 1d0794f + b81327f commit 88f8465

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

β€Ž.github/workflows/auth.ymlβ€Ž

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# .github/workflows/pr-validate.yml
1+
22
name: PR Validation via OIDC !!!!!!!!!!!!!!!!!!!!!
33

44
on:
55
pull_request_target:
66
types: [opened, synchronize]
77

88
permissions:
9-
id-token: write # enable OIDC token issuance
10-
contents: read # allow checkout of code
9+
id-token: write
10+
contents: read
1111

1212
env:
1313
CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
@@ -60,7 +60,7 @@ jobs:
6060
- name: πŸ” Request OIDC token from GitHub
6161
id: fetch_token
6262
run: |
63-
echo "🌐 Requesting OIDC token..."
63+
echo "Requesting OIDC token"
6464
raw=$(curl -s \
6565
-H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
6666
"${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=api://${CLIENT_ID}")
@@ -70,11 +70,12 @@ jobs:
7070
echo "TOKEN=$token" >> $GITHUB_ENV
7171
7272
# 3. Send a simple GET request to "/"
73-
- name: πŸ“‘ Send GET request to protected root endpoint
73+
- name: Send GET request to protected root endpoint
7474
run: |
75-
echo "πŸš€ GET $API_BASE/"
75+
76+
echo " GET request"
7677
response=$(curl -s -H "Authorization: Bearer $TOKEN" "$API_BASE/")
77-
echo "πŸ” GET response:"
78+
echo " GET response:"
7879
echo "$response" | jq . || true
7980
8081
@@ -91,15 +92,11 @@ jobs:
9192
result_status=$(echo "$response" | jq -r '.status // empty')
9293
message=$(echo "$response" | jq -r '.message // "No message provided"')
9394
94-
# Print for debugging
95-
echo "πŸ§ͺ result_status: $result_status"
96-
echo -e "πŸ“© message:\n$message"
97-
9895
# Handle result
9996
if [ "$result_status" != "passed" ]; then
10097
echo -e "❌ Validation failed:\n$message"
10198
exit 1
10299
fi
103100
104-
echo "βœ… Validation passed: $message"
101+
echo "βœ… $message"
105102

0 commit comments

Comments
Β (0)