8000 Support exporting as environment variables by F21 · Pull Request #43 · falti/dotenv-action · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support exporting as environment variables #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 28, 2023
Merged

Support exporting as environment variables #43

merged 2 commits into from
Feb 28, 2023

Conversation

F21
Copy link
Contributor
@F21 F21 commented Feb 13, 2023

This PR adds the export-variables option that also exports the variables as environment variables.

Closes #42

@F21
Copy link
Contributor Author
F21 commented Feb 27, 2023

ping @falti

Copy link
Owner
@falti falti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a unit test that validates the new behavior, thanks!

@F21
Copy link
Contributor Author
F21 commented Feb 28, 2023

I tried adding a test for it, but it seems like it's not possible to mock GitHub Actions' exportVariable. It doesn't write to process.env but calls ::set-env on the runner, so I am not sure how this can be tested.

@sionescu
Copy link

You can add test it by using it in a workflow and checking that the right env var is set.

@F21
Copy link
Contributor Author
F21 commented Feb 28, 2023

Great idea @sionescu , I added a test using GH Actions.

@falti
Copy link
Owner
falti commented Feb 28, 2023

Looks good @F21 - would you please update your branch from main, then I'll merge it.

@F21
Copy link
Contributor Author
F21 commented Feb 28, 2023

Done @falti 😄

@falti falti merged commit 6024f6b into falti:master Feb 28, 2023
@F21 F21 deleted the support-exporting-as-environment-variables branch February 28, 2023 22:03
@sionescu
Copy link
sionescu commented Feb 28, 2023

Can it preserve the case when exporting as environment variables ?
I know that by convention action outputs are all lowercase, but environment variables used in shell scripts are more commonly uppercase.

@F21
Copy link
Contributor Author
F21 commented Feb 28, 2023

@sionescu It doesn't preserve the case as everything is lower-cased by dotenv_action in https://github.com/falti/dotenv-action/blob/master/dotenv_action.js#L16. I have an issue regarding the lower-casing in #44.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Assignees
No one assigned
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support exporting as environment variables
3 participants
0