-
Notifications
You must be signed in to change notification settings - Fork 15
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
JSON is all uppercase #2
Comments
I encountered the same issue. @ylupien have you managed to find a resolution for this? |
Hey @ylupien @SouthernYoda, sorry for the delay. I've taken a quick look into the code but haven't managed to identify what's causing this behavior. Fixing this would require some debugging, which I don't currently have the time to do. I'll take a look into it as soon as I can, but in the mean time, feel free to take a look and submit a PR if you guys find anything |
This appears to be a limitation of using GitHub inputs in this way, the input keys are automatically converted to uppercase as described in the documentation for GitHub inputs. It's too bad because I really like how you specified the inputs. "When you specify an input to an action in a workflow file or use a default input value, GitHub creates an environment variable for the input with the name INPUT_<VARIABLE_NAME>. The environment variable created converts input names to uppercase letters and replaces spaces with _ characters." (https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#inputs) I've forked your repo and printed the "key" variable to console. The key value is already uppercase when it is read by the script. A resolution might be to nest the input so the user enters in:
Hope this helped, I don't have experience with node so this is as much help as I can provide for now. |
What about?: json-content:
- key: foo
value: blub
- key: bar
value: buz This would eliminate the unnecessary name for each element. |
A workaround is to follow this step with jacobtomlinson/gha-find-replace@v2 to overwrite the uppercase inside the json. |
I just forked the repo and converted all keys to be lowercase. If anyone needs that specific functionality, you can find it here: https://github.com/andrew-fennell/create-env-json If you need specific capitalization (not all lowercase or uppercase), such as "Key", the current release of this repo (v2) and my fork (v3) will not work for you. I believe the underlying issue is how GitHub handles the inputs. |
Hi !
Look like I have an case issue with this github action. I specified lower case in the configuration and the generated file is in uppercase.
Any recommendation ?
The text was updated successfully, but these errors were encountered: