ghatm
Set timeout-minutes to all GitHub Actions jobs.
ghatm
finds GitHub Actions workflows and add timeout-minutes
to jobs which don't have the setting.
ghatm
edits workflow files but keeps YAML comments, indents, empty lines, and so on.
Motivation
timeout-minutes
should be set properly, but if you have a lot of workflows which don't set timeout-minutes
it's so bothersome to fix all of them by hand.
ghatm
sets timeout-minutes
automatically.
How to install
ghatm
is a single binary written in Go.
So you only need to put the executable binary into $PATH
.
- Homebrew
brew install suzuki-shunsuke/ghatm/ghatm
- Scoop
scoop bucket add lintnet https://github.com/suzuki-shunsuke/scoop-bucket
scoop install ghatm
- aqua
aqua g -i suzuki-shunsuke/ghatm
-
Download a prebuilt binary from GitHub Releases and install it into $PATH
-
Go
go install github.com/suzuki-shunsuke/ghatm/cmd/ghatm@latest
How to use
Please run ghatm set
at the repository root directory.
ghatm set
then ghatm
checks GitHub Actions workflows ^\.github/workflows/.*\.ya?ml$
and sets timeout-minutes: 30
to jobs which don't have timeout-minutes
.
Jobs which have timeout-minutes
aren't changed.
You can specify the value of timeout-minutes
with -t
option.
ghatm set -t 60
You can specify workflow files by positional arguments.
ghatm set .github/workflows/test.yaml
Tips: Fix workflows by CI
Using ghatm
in CI, you can fix workflows automatically.
When workflow files are added or changed in a pull request, you can run ghatm
and commit and push changes to a feature branch.
LICENSE
MIT