rbenv / ruby-build

A tool to download, compile, and install Ruby on Unix-like systems.
https://rbenv.org/man/ruby-build.1
MIT License
3.89k stars 785 forks source link

Auto update Ruby definition with Ruby releases #2430

Closed hsbt closed 3 months ago

hsbt commented 3 months ago

Background:

I and release manager of Ruby improve release workflow recently. I make this manual workflow to automated workflow.

After Ruby release, https://github.com/ruby/ruby/pull/11286 notify to related repositories like docker image, snap package and etc.

I would like to create new definition of ruby-build with above notification. This PR makes it with repository_dispatch feature. After that, we can update definition with simple REST call like:

curl -L -X POST \
          -H "Authorization: Bearer xxx" \
          -H "Accept: application/vnd.github+json" \
          -H "X-GitHub-Api-Version: 2022-11-28" \
          https://api.github.com/repos/rbenv/ruby-build/dispatches \
          -d '{"event_type": "update-ruby", "client_payload":{"ruby_version":"3.3.4", "openssl_version":"3.0.14"}}'
hsbt commented 3 months ago

This and hotfix are working fine: https://github.com/rbenv/ruby-build/commit/d22fa95a6e4c77945304c16ebe0d9513fec98cfb

Thanks @eregon