From e098d01a6409507f9ac6f0612027663dd2ef213c Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Fri, 27 May 2022 13:56:15 +0100 Subject: [PATCH 1/2] Added lint as action This gives cleaner integration compared to digging around in cloudbuild output. We still may need to do GCB integration to perform further checks though. https://github.com/golangci/golangci-lint-action --- .github/workflows/golangci-lint.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/golangci-lint.yml diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..35eda91 --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,26 @@ +name: golangci-lint +on: + push: + tags: + - v* + branches: + - main + pull_request: +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + # pull-requests: read +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.17 + - uses: actions/checkout@v3 + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version + version: v1.46.1 From 89e3386f218ada261e9304fd575b8f9955a6cb06 Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Fri, 27 May 2022 14:12:05 +0100 Subject: [PATCH 2/2] Removed all filters under push - run on every branch push --- .github/workflows/golangci-lint.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 35eda91..16a7b0b 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -1,10 +1,6 @@ name: golangci-lint on: push: - tags: - - v* - branches: - - main pull_request: permissions: contents: read