This action downloads and sets up the SLV CLI and helps in injecting vault secrets as masked environment variables for workflows to consume.
This action can be run on ubuntu-latest
, windows-latest
, and macos-latest
GitHub Actions runners, and will install and expose the specified version of the slv
CLI on the runner environment.
Only setup the slv
CLI:
steps:
- name: Setup SLV
uses: amagioss/slv-action@main
A specific version of the slv
CLI can also be installed:
steps:
- name: Setup SLV
uses: amagioss/slv-action@main
with:
version: 0.1.5
Load SLV secrets into environment variables:
steps:
- name: Load SLV Secrets
uses: amagioss/slv-action@main
with:
vault: pets.slv.yml
env-secret-key: ${{ secrets.SLV_ENV_SECRET_KEY }}
Optionally specify a prefix that will be added to the environment variables in front of the secret names:
steps:
- name: Load SLV Secrets - PROD
uses: amagioss/slv-action@main
with:
version: 0.1.5
vault: pets.slv.yml
env-secret-key: ${{ secrets.SLV_ENV_SECRET_KEY }}
prefix: "PROD_"
The actions supports the following inputs:
version
: The version ofslv
to install, defaulting tolatest
vault
: Path to the vault fileenv-secret-key
: The SLV environment secret (key/binding) to use for the actionprefix
: Prefix to use for the environment variable names along with the SLV secret name