Skip to content

ashishb/gabo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions Boilerplate (gabo)

Lint YAML Lint Markdown Lint GitHub Actions Lint Go Validate Go code formatting Test

Check Go Releaser config for validity

Release Go binaries with Go Releaser Go report

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 homebrew version

$ 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

  • build-android
  • build-docker
  • check-go-releaser
  • compress-images
  • format-go
  • format-python
  • lint-android
  • lint-docker
  • lint-go
  • lint-html
  • lint-markdown
  • lint-python
  • lint-shell-script
  • lint-solidity
  • lint-yaml
  • lint-github-actions
  • translate-android
  • validate-openapi-schema
  • validate-render-blueprint
  • build-rust
  • lint-rust