Skip to content

mshick/fast-envsubst

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

Repository files navigation

Fast Envsubst

A GitHub Action which is a light wrapper around the envsub package, providing a GitHub Actions native runtime (Node.js) for envsubst-like activities.

Usage

- uses: mshick/fast-envsubst@v1
  env:
    FOO_VALUE: cat good
    BAR_VALUE: dog food
  with:
    env-file: __tests__/fixtures/example.env
    in-file: __tests__/fixtures/example.yaml.in
    out-file: __tests__/runner/example.yaml

input: example.env

ROGER=RABBIT

input: example.yaml.in

example:
  foo: ${FOO_VALUE}
  bar: ${BAR_VALUE}
  roger: ${ROGER}

output: example.yaml

example:
  foo: cat good
  bar: dog food
  roger: RABBIT

Features

  • Fast, runs in the GitHub Actions node.js runtime; no Docker pull needed.
  • Provide an env file and have it loaded into your substitution environment