Skip to content

Vault token

Vault token #11

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / Vault token

Invalid workflow file

The workflow is not valid. .github/workflows/vault.yaml (Line: 21, Col: 12): Unexpected symbol: '$TOKEN'. Located at position 10 within expression: fromJson($TOKEN).value
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}}