Skip to content

Commit b0251ed

Browse files
committed
Use built-in core object in github-script example
Replace manual require of @actions/core with the built-in core object that is automatically available in github-script action. This provides a cleaner and more straightforward approach. Reference: https://github.com/actions/github-script?tab=readme-ov-file#this-action
1 parent a0d175b commit b0251ed

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

content/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-cloud-providers.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,8 @@ jobs:
8080
id: idtoken
8181
with:
8282
script: |
83-
const coredemo = require('@actions/core')
84-
let id_token = await coredemo.getIDToken()
85-
coredemo.setOutput('id_token', id_token)
83+
let id_token = await core.getIDToken()
84+
core.setOutput('id_token', id_token)
8685
```
8786
8887
### Requesting the JWT using environment variables

0 commit comments

Comments
 (0)