Skip to content

Commit

Permalink
Update vault.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasBassoOcto authored May 22, 2024
1 parent 4f686a4 commit ca95ba8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/vault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update && sudo apt-get install vault
- name: install jq
- name: get_token
run: |
TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=startup-bootstrap")
echo $(echo $TOKEN | base64)
echo "::set-output name=VaultToken::$TOKEN"
- name: login vault
run: |
TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=startup-bootstrap")
echo $(${{fromJson($TOKEN).value}} | base64)
export VAULT_ADDR="https://vault-dev.factory.social.gouv.fr"
vault write auth/github-ci/login role=se-startup-bootstrap jwt=${{fromJson($TOKEN).value}}
TOKEN=${{fromJson(steps.get_token.outputs.VaultToken).value}}
vault write auth/github-ci/login role=se-startup-bootstrap jwt=$TOKEN

0 comments on commit ca95ba8

Please sign in to comment.