docs icon indicating copy to clipboard operation
docs copied to clipboard

[GitHub Actions] `environment` type missing in workflow input types documentation

Open mikelei8291 opened this issue 2 years ago • 6 comments

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

mikelei8291 avatar Jun 13 '23 00:06 mikelei8291

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] avatar Jun 13 '23 00:06 welcome[bot]

يمكن ان تحضر لي المستندات اطلع عليها اريد ترسل لي الي الى هنا على الجيميل وشكرا لك وساقوم بالبحث عن المستندات ان كان شيئا خطا ام كان شيئا صح وساخبرك بعدها عن الاطلاع على هذه الاوراق

في الثلاثاء، ١٣ يونيو ٢٠٢٣, ٣:٢٧ ص 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: @.***>

Obeda1995 avatar Jun 13 '23 02:06 Obeda1995

@mikelei8291 Thanks so much for opening an issue! I'll triage this for the team to take a look :eyes:

cmwilson21 avatar Jun 13 '23 13:06 cmwilson21

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.

nathanchapman avatar Jun 13 '23 15:06 nathanchapman

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.

mikelei8291 avatar Jun 15 '23 12:06 mikelei8291

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.

nathanchapman avatar Jun 15 '23 21:06 nathanchapman

#844147 @githubcopyrightdoctor

githubcopyrightdoctor avatar Jul 23 '23 16:07 githubcopyrightdoctor

[maintainer edited to remove spammy content]

githubcopyrightdoctor avatar Jul 23 '23 17:07 githubcopyrightdoctor

[maintainer edited to remove spammy content]

githubcopyrightdoctor avatar Jul 23 '23 17:07 githubcopyrightdoctor

Wait what? @cmwilson21 This should be fixed, any updates?

mikelei8291 avatar Sep 29 '23 16:09 mikelei8291

@mikelei8291 Sorry, our stalebot hit over the weekend. I'll get it reopened 👍

cmwilson21 avatar Oct 02 '23 12:10 cmwilson21

It would be great... I'm trying to understand better how "environment" works... what's the difference from a "string" type, for example

thiago-marafeli-VBL avatar Oct 02 '23 19:10 thiago-marafeli-VBL

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

FidelusAleksander avatar Nov 05 '23 13:11 FidelusAleksander

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

FidelusAleksander avatar Nov 05 '23 13:11 FidelusAleksander

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.

SiaraMist avatar Nov 08 '23 01:11 SiaraMist