rajatjindal / krew-release-bot

bot to bump version of plugin in krew-index on new releases
Apache License 2.0
46 stars 17 forks source link

Enable using the bot without GitHub actions #11

Open corneliusweig opened 4 years ago

corneliusweig commented 4 years ago

Some people can not or do not want to use GitHub actions. For those it would be great to have instructions how to use the bot outside of GH actions.

rajatjindal commented 4 years ago

thanks for reporting this. can you please elaborate how the release process might look like for those scenario?

rajatjindal commented 4 years ago

Hi @corneliusweig when you get chance, can you please clarify this issue.

corneliusweig commented 4 years ago

Hey @rajatjindal, I imagine something like this:

having instructions to use krew-release-bot as a standalone binary, and make that possible. Then people can call this binary whenever it makes sense and don't have to rely on the GH action.


Alternatively, the server-side could do more logic:

  1. Some plugin creates a release and puts release artifacts in GH.
  2. A hook POSTs to https://krew-release-bot.wherever/ with payload
    {
     "repo": "https://github.com/rajatjindal/some-plugin",
     "plugin": "some-plugin",
     "tag": "v1.2.3"
    }
  3. Release bot clones krew-index
  4. Release bot fetches .krew.yaml template from given repo
  5. Release bot applies substitutions in template
  6. Release bot creates a PR in krew-index for the given plugin

Then, every plugin can simply do a POST request to trigger the PR. This is so simple, that it can be done with cURL

rajatjindal commented 4 years ago

I like the idea of being able to run as standalone binary, will add an example for that.

we just removed the code to do extra processing on recommendation from Ahmet. :)