gabo
gabo copied to clipboard
GitHub Actions Boilerplate Generator
GitHub Actions Boilerplate (gabo)
gabo short for GitHub Actions Boilerplate is for ease-of-generation of GitHub actions boilerplate with good timeouts, path filters, and concurrency preventions. See this blogpost for more details on why the GitHub defaults aren't great.
The actions runs only on push/pull requests against main and master branch, by default.
Feel free to add more branches if you want to runs these checks when push/pull request against any other branches.
Installation
$ go install github.com/ashishb/gabo/src/gabo/cmd/gabo@latest
...
or via homebrew
$ brew install gabo
...
Or run directly
# --dir flag is optional and defaults to current directory
go run github.com/ashishb/gabo/src/gabo/cmd/gabo@latest --dir=<path-to-git-dir>
Usage
$ gabo --help
Usage of gabo:
-dir string
Path to root of git directory (default ".")
-for string
Generate GitHub Action (options: build-android,lint-android,translate-android,compress-images,build-docker,build-npm,build-yarn,lint-docker,format-go,lint-go,check-go-releaser,lint-html,lint-markdown,validate-openapi-schema,format-python,lint-python,lint-shell-script,lint-solidity,lint-yaml,lint-github-actions,validate-render-blueprint)
-force
Force overwrite existing files (in generate mode)
-mode string
Mode to operate in: [generate analyze] (default "analyze")
-verbose
Enable verbose logging
-version
Prints version of the binary
Sample usage - analyze a repository
# Analyze current directory (it should be the root of the repository)
$ gabo
# Analyze a different dir
$ gabo --dir=~/src/repo1
Sample usage - generate code
$ gabo --mode=generate --for=lint-docker
Wrote file .github/workflows/lint-docker.yaml
Supported actions
- [x] build-android
- [x] build-docker
- [x] check-go-releaser
- [x] compress-images
- [x] format-go
- [x] format-python
- [x] lint-android
- [x] lint-docker
- [x] lint-go
- [x] lint-html
- [x] lint-markdown
- [x] lint-python
- [x] lint-shell-script
- [x] lint-solidity
- [x] lint-yaml
- [x] lint-github-actions
- [x] translate-android
- [x] validate-openapi-schema
- [x] validate-render-blueprint
- [ ] build-rust
- [ ] lint-rust