Giter VIP home page Giter VIP logo

create-env-file-action's Introduction

create-env-file action

Github Action to write Github Secrets into a .env file. The action looks for variables that start with ENV_ and creates a .env file with them.

Inputs

key

Required Should start with ENV_ prefix

value

Required Should be in the format specified in Github's documentation

file-name

Optional The name of the file to be written. Default .env

Usage

  1. Add it as a new step to your job.
  2. Add a key/value in with: section.
  3. Go to your repository -> settings -> secrets and add secrets you want to be written into a .env file.

Example usage

on:
  push:
    branches:
      - master
jobs: 
  create_env_file_job:
    runs-on: ubuntu-latest
    steps:
      - name: Create .env file
        uses: ozaytsev86/create-env-file@v1
        with:
          ENV_TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
          ENV_ANOTHER_KEY: ${{ secrets.ANOTHER_KEY }}

NOTE: be sure that ubuntu-latest or any other image you use has node installed.

Result .env

TEST_API_KEY: '1234test',
ANOTHER_KEY: 'Super secret'

License

This project released under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.