dockerhub-description
dockerhub-description copied to clipboard
check and create dockerhub repo before updating description
check and create dockerhub repo before updating description
Hi @wangkexiong
Thank you for contributing! This looks like a useful feature and I would be happy to support it in this action.
I would like to request some changes to the inputs interface before merging this in.
- I think this feature should be optional. So I would like to see a boolean input for this feature which defaults to
false.createRepository: description: > Create the Docker Hub repository if it doesn't exist Default: `false` - I think the default visibility of the created repository should be private.
createAsPrivate: description: > Created Docker Hub repositories will have private visibility Default: `true`
If the interface can be updated to the above then I will be able to release this feature as a minor version bump, rather than it being a breaking change in behaviour.
- createRepository is in the critical path to update description of dockerhub project. That's the reason I made this change. If repository is NOT there, update API will surely fail. I suggest we should NOT have this parameter.
- For private parameter: since there is only 1 private repository for regular account. I suggest the default value to be false. Otherwise, the create repository API will fail if there is already a private repository.
:-)
createRepository is in the critical path to update description of dockerhub project. That's the reason I made this change. If repository is NOT there, update API will surely fail. I suggest we should NOT have this parameter.
The reason for the createRepository input is so I can release this as a minor (feature) version bump. Otherwise it forces me to release it as a major version bump because it's potentially a breaking behaviour change. You might think that all users would be happy with this change, but I guarantee that some users out of the thousands that use this action will not want this feature enabled by default.
I might consider a major version bump where the feature is enabled by default, but even then, the createRepository input should be available to turn it off.
For private parameter: since there is only 1 private repository for regular account. I suggest the default value to be false. Otherwise, the create repository API will fail if there is already a private repository.
I think it's fine for it to fail in that situation. I'm more concerned that the action could accidentally create a public repo and publish something that the user intended to be private. It should default to private to prevent accidental leaks.
Hi @wangkexiong
I've decided not to add this functionality for now. I would like to keep this action as simple as possible. I might come back to it in future, though, if many users express an interest in the action supporting this.
Thank you for the effort to contribute. I do appreciate it.