.env parser action

September 9, 2022 · View on GitHub

read the content of .env files into the GitHub Actions Context

license

Why

GitHub Actions already contains plenty of context for use within Actions workflows.

However, it's very limited, and does not include the entirety of the repository metadata.

Inputs

inputrequireddefaultdescription
file.envpath to .env file

Usage

jobs:
  job:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - id: metadata
        uses: ahmadnassri/action-dotenv@v1

      - run: echo ${{ env.foo }} ${{ env.bar }}

Author: Ahmad Nassri • Twitter: @AhmadNassri