google / keep-sorted

keep-sorted is a language-agnostic formatter that sorts lines between two markers in a larger file.
Apache License 2.0
132 stars 15 forks source link

Have pre-commit bootstrap go so that GitHub actions don't need to #21

Closed JeffFaer closed 9 months ago

JeffFaer commented 9 months ago

It looks like GitHub actions only use go 1.20 by default, so anyone using keep-sorted via the GitHub action pre-commit would need to separately install go 1.21. It looks like pre-commit can do that for us automatically.

See https://github.com/google/keep-sorted/pull/18#discussion_r1450679143 for more details

Tested in a child PR https://github.com/google/keep-sorted/pull/22