Vault token #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | ||
workflow_dispatch: | ||
name: Vault token | ||
jobs: | ||
vault-login: | ||
runs-on: ubuntu-latest | ||
name: Says Hello World | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- name: Install Vault CLI | ||
run: | | ||
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 | ||
run: | | ||
- name: login vault | ||
run: | | ||
Check failure on line 21 in .github/workflows/vault.yaml GitHub Actions / Vault tokenInvalid workflow file
|
||
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}} |