From 6f09aaf7f46e95d723ce151b121cc8e18b65a12f Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Thu, 4 Aug 2022 12:52:08 -0400 Subject: Switch to golangci-lint GitHub Action Signed-off-by: Dave Henderson --- .github/workflows/build.yml | 7 ------- .github/workflows/lint.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/lint.yml (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11274392..f879ac0f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,10 +61,3 @@ jobs: path: bin/gomplate.exe - run: make test - run: make integration - lint: - runs-on: ubuntu-latest - container: - image: ghcr.io/hairyhenderson/gomplate-ci-build:latest - steps: - - uses: actions/checkout@v3 - - run: make ci-lint diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..d8ae5c68 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,26 @@ +name: golangci-lint +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + # Use 1.18 rather than 1.19 for linting due to https://github.com/golangci/golangci-lint/issues/2374 + go-version: 1.18 + - uses: actions/checkout@v3 + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: latest + args: --max-same-issues=0 --max-issues-per-linter=0 + -- cgit v1.2.3