Skip to content

Instantly share code, notes, and snippets.

@mushoffa
Created March 26, 2022 13:24
Show Gist options
  • Save mushoffa/81eb20b53b65efc13171de9ad4b2f295 to your computer and use it in GitHub Desktop.
Save mushoffa/81eb20b53b65efc13171de9ad4b2f295 to your computer and use it in GitHub Desktop.
GitHub Actions workflow for 'linting' process using Go language
name: Go Lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint_publisher:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
stable: 'false'
go-version: 1.17
- name: Lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0
golangci-lint run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment