Update final_combined.yml #93
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test OIDC GET Request | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| oidc-get: | |
| runs-on: ubuntu-latest | |
| env: | |
| CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | |
| steps: | |
| - name: π Request OIDC token from GitHub | |
| id: fetch_token | |
| run: | | |
| echo "π Requesting OIDC token..." | |
| raw=$(curl -s \ | |
| -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ | |
| "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=api://${CLIENT_ID}") | |
| echo "π Raw token response JSON: $raw" | |
| token=$(echo "$raw" | jq -r '.value') | |
| echo "βοΈ Token length: ${#token}" | |
| echo "TOKEN=$token" >> $GITHUB_ENV | |
| - name: π‘ Send GET request too prod | |
| run: | | |
| echo "π Sending GET to prod" | |
| response=$(curl -s -H "Authorization: Bearer $TOKEN" "https://sentinel-content-validationapi-prod-bvgsc3hjhyeqangg.canadacentral-01.azurewebsites.net/") | |
| echo "π Response JSON:" | |
| echo "$response" | jq . | |
| - name: π‘ Send GET request too dev | |
| run: | | |
| echo "π Sending GET to dev" | |
| response=$(curl -s -H "Authorization: Bearer $TOKEN" "https://sentinel-content-validation-dev-edbve7bwfjbaa6cc.canadacentral-01.azurewebsites.net/") | |
| echo "π Response JSON:" | |
| echo "$response" | jq . | |