-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Inputs with -
are hard to test due to shells not supporting env variables with -
in the name
#629
Comments
actions#629 Dashed environment variable is invalid in most system
Hi @estahn thanks for opening an issue! Do you have a small example where this is failing for you? Is this OS specific? |
Going to close this, we can reopen once we understand the issue better! |
|
I've tagged this as an enhancement to make testing easier. Some shells don't support it, noticeably For now, you can workaround this by setting the environment variable using |
-
are hard to test due to shells not supporting env variables with -
in the name
The GitHub Action docs [illustrate](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs) using hyphens in input names, and then document that names like `octocat-eye-color` are converted to environment variables like `INPUT_OCTOCAT-EYE-COLOR`, but these environment variable names are [not POSIX compliant](https://stackoverflow.com/a/36992531/2019542) and can't be accessed in many shells. They've [known about this](actions/toolkit#629) for two years. Grrrr.
The GitHub Action docs [illustrate](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs) using hyphens in input names, and then document that names like `octocat-eye-color` are converted to environment variables like `INPUT_OCTOCAT-EYE-COLOR`, but these environment variable names are [not POSIX compliant](https://stackoverflow.com/a/36992531/2019542) and can't be accessed in many shells. They've [known about this](actions/toolkit#629) for two years. Grrrr.
The GitHub Action docs [illustrate](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs) using hyphens in input names, and then document that names like `octocat-eye-color` are converted to environment variables like `INPUT_OCTOCAT-EYE-COLOR`, but these environment variable names are [not POSIX compliant](https://stackoverflow.com/a/36992531/2019542) and can't be accessed in many shells. They've [known about this](actions/toolkit#629) for two years. Grrrr.
The GitHub Action docs [illustrate](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs) using hyphens in input names, and then document that names like `octocat-eye-color` are converted to environment variables like `INPUT_OCTOCAT-EYE-COLOR`, but these environment variable names are [not POSIX compliant](https://stackoverflow.com/a/36992531/2019542) and can't be accessed in many shells. They've [known about this](actions/toolkit#629) for two years. Grrrr.
Rather than just hyphens, eases calling from other contexts, such as when testing. Closes: actions#629
Describe the bug
I'm trying to test my action and according to the code the input variables seem to be injected through input variables. See
toolkit/packages/core/src/core.ts
Line 86 in e7eb2c7
Given the GITHUB_TOKEN is provided via
with
:This would result in
INPUT_REPO-TOKEN
as an environment variable. Which is invalid.The following is therefore not possible:
The text was updated successfully, but these errors were encountered: