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

Add action typing #44

Closed
krzema12 opened this issue Feb 1, 2023 · 4 comments · Fixed by #45
Closed

Add action typing #44

krzema12 opened this issue Feb 1, 2023 · 4 comments · Fixed by #45

Comments

@krzema12
Copy link
Contributor

krzema12 commented Feb 1, 2023

Hi @marcuspoehls!

I'd like to ask you to add a piece of documentation. However, it won't be yet another piece of Markdown. When working with various actions, I discovered that it's challenging to know what type of data is needed for the inputs of an action, the same for outputs. Every action has its own custom way of documenting it, if it documents it at all, which makes it challenging for humans and automation to work with various actions. I figured there must be a way to address it.

I looked for an inspiration in other ecosystems where types were added later, like TypeScript adding types for JavaScript, or type hints in the Python world. I decided to create github-actions-typing which aspires to be the standardized way of typing your action's API. Onboarding is as easy as adding an extra action-types.yml file to your repository root, and (optionally, although highly recommended) adding a simple GitHub workflow that validates this new file. It has no negative effects on current action consumers, they continue to use the action as if the file wasn't there.

In this feature request, I would like to ask you if you're open to introducing such typings in your action. You wouldn't be first - there're already other actions using it, like e.g.: microsoft/setup-msbuild, Vampire/setup-wsl, ReactiveCircus/android-emulator-runner (full list of actions using the validation workflow is here)
If your answer is "yes", feel free to either add it yourself, or let me know - me or some of the other contributors would be happy to post a PR. We're also open to any kind of questions and feedback.

@marcuspoehls
Copy link
Member

I can’t put any time to this at the moment. Maybe you can submit a pull request making the requested changes

@krzema12
Copy link
Contributor Author

krzema12 commented Feb 4, 2023

@marcuspoehls here's one ☝️

@marcuspoehls
Copy link
Member

@krzema12 Merged. Thank you Piotr for helping out with the pull request!

@krzema12
Copy link
Contributor Author

krzema12 commented Feb 10, 2023

@marcuspoehls my pleasure!
Could you also release it? Otherwise it's technically not available for certain kinds of automation. It needs to be accessible from the major version tag (the new file should be visible when going to https://github.com/supercharge/mongodb-github-action/tree/v1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants