Skip to content

Commit 81b0233

Browse files
Add OIDC token generation step to CI/CD workflow
Added a step to generate and display an OIDC token in the CI/CD workflow.
1 parent d29d823 commit 81b0233

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/ci-cd.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@ jobs:
4444
steps:
4545
- name: Checkout code
4646
uses: actions/checkout@v3
47-
47+
- name: Generate and display OIDC token
48+
run: |
49+
echo "Requesting OIDC token..."
50+
ID_TOKEN=$(curl -sX GET \
51+
-H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
52+
"$ACTIONS_ID_TOKEN_REQUEST_URL")
53+
echo "OIDC token: $ID_TOKEN"
4854
- name: Setup Node.js
4955
uses: actions/setup-node@v3
5056
with:

0 commit comments

Comments
 (0)