{"id":18487977,"url":"https://github.com/c-py/action-dotenv-to-setenv","last_synced_at":"2025-07-10T09:33:06.050Z","repository":{"id":56517847,"uuid":"261951686","full_name":"c-py/action-dotenv-to-setenv","owner":"c-py","description":"GitHub Action to export a dotenv file to environment variables (via set-env)","archived":false,"fork":false,"pushed_at":"2023-11-20T09:22:17.000Z","size":25,"stargazers_count":22,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-31T10:42:40.530Z","etag":null,"topics":["dotenv"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c-py.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-07T04:45:30.000Z","updated_at":"2024-08-18T11:18:44.000Z","dependencies_parsed_at":"2024-06-18T19:56:27.305Z","dependency_job_id":"3085311e-f96d-4e02-9bb0-43ff16b87d13","html_url":"https://github.com/c-py/action-dotenv-to-setenv","commit_stats":{"total_commits":14,"total_committers":4,"mean_commits":3.5,"dds":0.6428571428571428,"last_synced_commit":"80f488cda311f44d43e687a4e94f54a050b7822a"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-py%2Faction-dotenv-to-setenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-py%2Faction-dotenv-to-setenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-py%2Faction-dotenv-to-setenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-py%2Faction-dotenv-to-setenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c-py","download_url":"https://codeload.github.com/c-py/action-dotenv-to-setenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225629628,"owners_count":17499297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotenv"],"created_at":"2024-11-06T12:51:07.239Z","updated_at":"2024-11-20T21:17:52.428Z","avatar_url":"https://github.com/c-py.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# action-dotenv-to-setenv\n\nGitHub action to export a `.env` file to environment variables (via [$GITHUB_ENV](https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable))\n\nAdapted from https://github.com/madcoda/dotenv-shell\n\n## Inputs\n\n### `env-file`\n\n**Required** Path to the dotenv file. Default `\".env\"`.\n\n## Outputs\n\n[`echo \"{name}={value}\"`](https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable) workflow commands to `$GITHUB_ENV`.\n\n```shell\necho \"TEST_DEFAULT_ENVFILE=expected\" \u003e\u003e $GITHUB_ENV\necho \"TEST_DOTENV_OVERRIDES_DEFAULT=unexpected\" \u003e\u003e $GITHUB_ENV\necho \"TEST_UNQUOTED=unexpected\" \u003e\u003e $GITHUB_ENV\necho \"TEST_UNQUOTED=a=1 b=2 c=3\" \u003e\u003e $GITHUB_ENV\necho \"TEST_SINGLE_QUOTED=1 2 3 4\" \u003e\u003e $GITHUB_ENV\necho \"TEST_DOUBLE_QUOTED=1 2 3 4\" \u003e\u003e $GITHUB_ENV\necho \"TEST_INTERPOLATION=a=1 b=2 c=3 d=4\" \u003e\u003e $GITHUB_ENV\necho \"TEST_EXISTING=new-value\" \u003e\u003e $GITHUB_ENV\necho \"TEST_DOTENV_OVERRIDES_DEFAULT=expected\" \u003e\u003e $GITHUB_ENV\necho \"TEST_NO_NEWLINE=still there\" \u003e\u003e $GITHUB_ENV\n```\n\n## Example Usage\n\n```\nuses: c-py/action-dotenv-to-setenv@v5\nwith:\n  env-file: .env\n```\n\n## Usage with `NODE_OPTIONS`\n\nUnfortunately, `NODE_OPTIONS` cannot be set in this action due to GitHub [security settings](https://github.com/c-py/action-dotenv-to-setenv/issues/9). To work around this `NODE_OPTIONS` is automatically output under `node_options`.\n\n```\n  - uses: c-py/action-dotenv-to-setenv@v5\n    id: source-env\n    with:\n      env-file: .env\n  - run: echo ${{ steps.source-env.outputs.node_options }} \n```\n\n\n## Tests\n\n```\n$ bash tests/dotenv-test.sh\nContents of $GITHUB_ENV file:\nTEST_DEFAULT_ENVFILE=expected\nTEST_DOTENV_OVERRIDES_DEFAULT=unexpected\nTEST_UNQUOTED=unexpected\nTEST_UNQUOTED=a=1 b=2 c=3\nTEST_SINGLE_QUOTED=1 2 3 4\nTEST_SINGLE_QUOTE_NO_INTERPOLATE=${TEST}\nTEST_DOUBLE_QUOTED=1 2 3 4\nTEST_INTERPOLATION=a=1 b=2 c=3 d=4\nTEST_EXISTING=new-value\nTEST_DOTENV_OVERRIDES_DEFAULT=expected\nTEST_SPECIAL_CHARACTER=special(character\nTEST_NO_NEWLINE=still there\n\nTesting blank line parsing: ok\nTesting unquoted: ok\nTesting single quoted: ok\nTesting single-quoted variables arent interpolated: ok\nTesting double quoted: ok\nTesting interpolation: ok\nTesting overwrite of existing variables: ok\nTesting parsing of last line: ok\nTest loading variables from default.env file: ok\nTest .env variables override variables from default.env file: ok\nTesting special characters: ok\nTest error message from missing .env file: ok\nTest NODE_OPTIONS skipped: ok\nTest NODE_OPTIONS set in output: ok\n$\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-py%2Faction-dotenv-to-setenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc-py%2Faction-dotenv-to-setenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-py%2Faction-dotenv-to-setenv/lists"}