GitHub Action
Inject secrets to yaml files
v0.0.1
Latest version
Allow to inject secrets from GHA to yaml files. As example can be used with helm to inject the secrets
This action is usefull to manage your project secrets via Github instead of external applications.
Use this action in your workflow as in the example:
- name: Inject secrets to yaml files
uses: none0nfg/[email protected]
with:
inject_files: |-
path/to/file1.yaml
path/to/file2.yaml
secrets: ${{ toJSON(secrets) }} # It would contain all your repository secrets in json (let it be {"DEV_PASSWORD": "pass123"} for now)
Example of the file to inject:
SECRETS:
password: "{{ DEV_PASSWORD }}" # Here, DEV_PASSWORD it's a key of GHAs secret
Result:
SECRETS:
password: "pass123"
Action will inject matched keys to yaml files by rewriting them.