Skip to content

Commit

Permalink
add vault addr as job env
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasBassoOcto authored May 23, 2024
1 parent cb32904 commit 040fc85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/vault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
permissions:
contents: read
id-token: write
env:
VAULT_ADDR: "https://vault-dev.factory.social.gouv.fr"
steps:
- name: Install Vault CLI
run: |
Expand All @@ -24,7 +26,6 @@ jobs:
run: |
TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=startup-bootstrap")
TOKEN=$(jq -r '.value' <<< $TOKEN)
export VAULT_ADDR="https://vault-dev.factory.social.gouv.fr"
VAULT_RESPONSE=$(vault write -format=json auth/github-ci/login role=se-startup-bootstrap jwt=$TOKEN)
VAULT_TOKEN=$(echo $VAULT_RESPONSE | jq -r '.auth.client_token')
vault login $VAULT_TOKEN
Expand Down

0 comments on commit 040fc85

Please sign in to comment.