Skip to content

Vendic/github-dotenv-to-setenv-action

Repository files navigation

Github .env to actions environment variable Tests

GitHub action to export a .env file to environment variables (via $GITHUB_ENV)

Usage

Create .env:

hello=world
foo=bar
bar=foo,bar,baz

Use in action:

jobs:
    read_dot_env:
        name: Read dot env
        runs-on: self-hosted
        steps:
            -   uses: actions/checkout@v2

            -   name: Read dot env
                uses: Vendic/github-dotenv-to-setenv-action@master
                id: dotenv
                with:
                    path: .env

            -   name: Test env
                run: |
                    echo ${{ env.hello }}