Skip to content

Instantly share code, notes, and snippets.

@lenardchristopher
Last active September 5, 2021 12:32
Show Gist options
  • Save lenardchristopher/efaad10597b8dc2607224ad098df58ce to your computer and use it in GitHub Desktop.
Save lenardchristopher/efaad10597b8dc2607224ad098df58ce to your computer and use it in GitHub Desktop.
Github Action Golang Lint
name: Golang Lint
on: [pull_request]
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.42
# Optional: working directory, useful for monorepos
# working-directory: somedir
# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# Optional: if set to true then the action will use pre-installed Go.
# skip-go-installation: true
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment