Skip to content

Allow to inject secrets from GHA to yaml files. As example can be used with helm to inject the secrets

Notifications You must be signed in to change notification settings

none0nfg/yaml-secrets-injector

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yaml-secrets-injector

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.

Usage

Use this action in your workflow as in the example:

      - name: Inject secrets to yaml files
        uses: none0nfg/yaml-secrets-injector@v0.0.1
        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.

About

Allow to inject secrets from GHA to yaml files. As example can be used with helm to inject the secrets

Resources

Stars

Watchers

Forks

Packages