Skip to content

Commit

Permalink
2024.07.29-1515
Browse files Browse the repository at this point in the history
  • Loading branch information
kborovik committed Jul 29, 2024
1 parent b041ebf commit 0c526a6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/lab5-gcp-dev1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,21 @@ env:

on: push

permissions:
id-token: write
contents: read

jobs:
terraform-plan:
runs-on: ubuntu-latest
environment: lab5-gcp-dev1
permissions:
id-token: write
contents: read
steps:
- name: Get OIDC token
uses: actions/github-script@v6
with:
script: |
const tokenUrl = process.env.ACTIONS_ID_TOKEN_REQUEST_URL
const token = await github.request({
url: tokenUrl,
headers: {
Authorization: `Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`
}
})
console.log("OIDC token:", token.data.value)
- name: Get OIDC Token and display audience
run: |
OIDC_TOKEN=$(curl -sLS "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=your-audience" \
-H "User-Agent: actions/oidc-client" \
-H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN")
AUD_CLAIM=$(echo $OIDC_TOKEN | jq -r '.aud')
echo "OIDC Token Audience: $AUD_CLAIM"
- id: checkout
name: Code Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024.07.29-1506
2024.07.29-1515

0 comments on commit 0c526a6

Please sign in to comment.