[GitHub Actions] `environment` type missing in workflow input types documentation
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputsinput_idtype
https://docs.github.com/en/actions/learn-github-actions/contexts#inputs-context
What part(s) of the article would you like to see updated?
environment type should be added to the list of allowed types.
This type had been in the list of allowed types before #25435 was opened and it was considered as a typo of "number". The environment type is indeed not listed in the table of all available types in the inputs context documentation, but it is used in an example in the on.workflow_dispatch.inputs documentation, and in real world applications as mentioned by @nathanchapman in this comment.
Therefore, I don't think this is a typo, but a miss in the documentations linked above, and would like it to be added back to the documentations.
Someone familiar with the action runner code could also clarify whether the environment type is allowed, or is it about to be removed.
Additional information
No response
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
يمكن ان تحضر لي المستندات اطلع عليها اريد ترسل لي الي الى هنا على الجيميل وشكرا لك وساقوم بالبحث عن المستندات ان كان شيئا خطا ام كان شيئا صح وساخبرك بعدها عن الاطلاع على هذه الاوراق
في الثلاثاء، ١٣ يونيو ٢٠٢٣, ٣:٢٧ ص welcome[bot] @.***> كتب:
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines https://github.com/github/docs/blob/main/CONTRIBUTING.md.
— Reply to this email directly, view it on GitHub https://github.com/github/docs/issues/25938#issuecomment-1588285493, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7EAFFHHVUUCBWRRF6OF4FDXK6XVXANCNFSM6AAAAAAZEC3CVA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@mikelei8291 Thanks so much for opening an issue! I'll triage this for the team to take a look :eyes:
I left a comment on #25435, but I'll reiterate here since that issue is closed.
environment is a valid type, I'm not sure why that change was accepted by the GitHub team 😕
https://github.blog/changelog/2021-11-10-github-actions-input-types-for-manual-workflows/
Is number even valid? Are they not treated as strings?
I can't find a changelog entry or any documentation for number before #25435 was opened.
Thanks for reiterating your comment here.
However, number is a valid type and I've been using it in my workflows, although it seems that they are treated as strings.
I think it was probably because GitHub unified the inputs context for workflow_call and workflow_dispatch so they both have the same set of input types now. This is important, because once the runner implemented the support for YAML anchors (actions/runner#1182), I could greatly simplify my workflow file by not repeating the same inputs definition for both workflow_call and workflow_dispatch events.
Agreed, the input unification was great 👏
Was just wanting to make sure number wasn't fabricated by the author of #25435 since I couldn't find any documentation for it prior to https://github.com/github/docs/pull/25436 being merged.
#844147 @githubcopyrightdoctor
[maintainer edited to remove spammy content]
[maintainer edited to remove spammy content]
Wait what? @cmwilson21 This should be fixed, any updates?
@mikelei8291 Sorry, our stalebot hit over the weekend. I'll get it reopened 👍
It would be great... I'm trying to understand better how "environment" works... what's the difference from a "string" type, for example
I'm fixing this https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputsinput_idtype In https://github.com/github/docs/pull/29781
It would be great... I'm trying to understand better how "environment" works... what's the difference from a "string" type, for example
Environment is most similar to choice but the options are automatically populated with name of all environments in a repository
Thank you for opening this issue, @mikelei8291! I've approved the PR that @FidelusAleksander opened to address this, and we'll get that merged next week once our repo is unfrozen.