Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
lock

GitHub Action

Variable to Dotenv

v1.0.0

Variable to Dotenv

lock

Variable to Dotenv

Appends a variable to a dotenv file

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Variable to Dotenv

uses: TickX/var-to-dotenv@v1.0.0

Learn more about this action in TickX/var-to-dotenv

Choose a version

GitHub license

Variable to Dotenv

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

Usage

steps:
  - uses: TickX/var-to-dotenv@v1.0.0
    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
      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.