Skip to content
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

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

Open
1 task done
mikelei8291 opened this issue Jun 13, 2023 · 9 comments
Open
1 task done
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review

Comments

@mikelei8291
Copy link

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 mikelei8291 added the content This issue or pull request belongs to the Docs Content team label Jun 13, 2023
@welcome
Copy link

welcome bot commented Jun 13, 2023

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.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team. label Jun 13, 2023
@Obeda1995

This comment was marked as spam.

@cmwilson21
Copy link
Collaborator

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

@cmwilson21 cmwilson21 added actions This issue or pull request should be reviewed by the docs actions team waiting for review Issue/PR is waiting for a writer's review and removed triage Do not begin working on this issue until triaged by the team. labels Jun 13, 2023
@nathanchapman
Copy link

nathanchapman commented Jun 13, 2023

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.

@mikelei8291
Copy link
Author

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.

@nathanchapman
Copy link

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 #25436 being merged.

@githubcopyrightdoctor

This comment was marked as spam.

@githubcopyrightdoctor

This comment was marked as spam.

1 similar comment
@githubcopyrightdoctor

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review
Projects
None yet
Development

No branches or pull requests

5 participants