Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akefirad/loadenv-action
LoadEnv GitHub Action
https://github.com/akefirad/loadenv-action
Last synced: 8 days ago
JSON representation
LoadEnv GitHub Action
- Host: GitHub
- URL: https://github.com/akefirad/loadenv-action
- Owner: akefirad
- License: mit
- Created: 2023-08-26T09:22:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-04T21:26:14.000Z (about 1 year ago)
- Last Synced: 2023-12-05T20:25:11.301Z (about 1 year ago)
- Language: TypeScript
- Size: 425 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# LoadEnv GitHub Action
## Examples
```yaml
jobs:
simple:
runs-on: ubuntu-latest
steps:
- uses: akefirad/loadenv-action@naun
- run: echo $FOO $BAR # FOO and BAR are defined in /.env filecomplex:
runs-on: ubuntu-latest
steps:
- uses: akefirad/loadenv-action@main
id: loadenv
name: Loads `./path/to/.env`, expands, checks, and export variables
with:
files: ./path/to/.env
strict: true # default true
expand-vars: true # default true
export-vars: true # default true
additional-vars: "${{ toJSON(vars) }}" # to make them available while expanding!!!
- name: Use output variables
run: echo ${{ steps.loadenv.FOO }} ${{ steps.loadenv.BAR }}
- name: Use exported variables
run: echo $FOO $BAR
```See [tests.yml](.github/workflows/tests.yml) file for more examples.
## API
See [action.yml](action.yml) file for full API.