Skip to content

TickX/var-to-dotenv

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

GitHub license

Variable to Dotenv

A GitHub action that appends a variable to a dotenv file.

Usage

steps:
  - uses: TickX/var-to-dotenv@v1.1.1
    with:
      key: 'SOME_API_URI' # [Required]
      value: ${{secrets.SOME_API_URI}} # [Required]
      default: 'https://api.alt.com' # [Optional] if `value` is empty, this is used instead
      nullable: 'false' # [Optional] if the resolved value is empty, the variable will be omitted
      envPath: '.env' # [Optional] The path to the dotenv file (defaults to `.env`)

You can use this more than once in your workflow to add multiple variables.