Skip to main content

SLV in Github Actions

Supported Runners

  • ubuntu-latest
  • windows-latest
  • macos-latest

Inputs

  • version: The version of slv to install, defaulting to latest
  • vault: Path to the vault file
  • env-secret-key: The SLV environment secret (key/binding) to use for the action
  • prefix: Prefix to use for the environment variable names along with the SLV secret name

Use Cases

Set Up SLV CLI

You can use the action to set up SLV CLI on the runner.

steps:
- name: Setup SLV
uses: amagioss/slv-action@v1

Install a Specific Version

steps:
- name: Setup SLV
uses: amagioss/slv-action@v1
with:
version: 0.9.2

Load SLV Secrets Into Environment Variables

You can use the action to load secrets from a vault into environment variables that can further be consumed by other actions or programs.

steps:
- name: Load SLV Secrets
uses: amagioss/slv-action@v1
with:
vault: creds.slv.yml
env-secret-key: ${{ secrets.SLV_ENV_SECRET_KEY }}

Set a Prefix for Variables

If you'd like to set a prefix across all the environment variables created by SLV, you can do so by specifying the prefix parameter.

steps:
- name: Load SLV Secrets - PROD
uses: amagioss/slv-action@v1
with:
vault: creds.slv.yml
env-secret-key: ${{ secrets.SLV_ENV_SECRET_KEY }}
prefix: "PROD_"