docker / build-push-action

GitHub Action to build and push Docker images with Buildx
https://github.com/marketplace/actions/build-and-push-docker-images
Apache License 2.0
4.36k stars 558 forks source link

Add action typing #789

Closed krzema12 closed 1 year ago

krzema12 commented 1 year ago

Hi @crazy-max!

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.

crazy-max commented 1 year ago

This is interesting but I don't think we are going to move forward with this. It should be done upstream by GitHub in their Runner app and/or toolkit so it can be consumed directly by developers. Suggest to contact GitHub or open a thread in https://github.com/orgs/community/discussions. Thanks.

krzema12 commented 1 year ago

Yeah, I'd also see first-party support for this. I've already got in touch with GitHub, but there's not much traction: https://github.com/orgs/community/discussions/32054 hence my approach of introducing a third-party tool. The more popular it gets, the higher chance for GitHub to actually introduce something from their side. Given this, please reconsider, and I'll or course respect any decision.

crazy-max commented 1 year ago

introducing a third-party too

That's the issue, it should not be part of the userspace.

Given this, please reconsider, and I'll or course respect any decision.

Sorry but not interested. Wish you good luck with your project though.