adamkss / var-to-dotenv

A GitHub action that appends a variable to a dotenv file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

A GitHub action that appends a variable to a dotenv file

License:MIT License


Languages

Language:TypeScript 97.8%Language:JavaScript 2.2%