A composite action that puts Hachicorp vault secrets to files
- name: Get secrets from hachicorp kv vault
uses: ergrassa/vault-secrets-to-files@v1.0
with:
url: '${{ secrets.URL }}'
token: '${{ secrets.TOKEN }}'
engine: '${{ secrets.KV }}'
path: 'somedir'
debug: 'no'
url
is url of your vault, like'http://your-vault.example.com'
engine
is name of KV enginetoken
is token that have at least read access policy to the secretpath
(optional) is base path where to put files, like'/envs'
debug
(optional) if set to'yes'
— will produce an output showing secret names, types and output path (values will be not exposed, only keys)
__filename__
is file name to save that secrets, likemy_env_file.env
__type__
says how to interpret the secret (details below)__path__
is subpath where to put this file, likemy_envs
, it will be concat-ed withpath
json
(default) will be saved as non-minified jsonenv
will be saved asKEY=VAULE
yml
oryaml
will be saved as non-minified yamltxt
ortext
is line-by-line text file, keys are line numbersfile
is base64-encoded file, it must have the keysdata
andfilename
, anddata
must start withdata:application/octet-stream;base64,