From e625894b75ceb79913a4c51fca7cbaefdba22150 Mon Sep 17 00:00:00 2001 From: Tom Gehrke Date: Mon, 11 Mar 2024 10:46:31 +0100 Subject: [PATCH 1/4] update golangci-lint --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed9e3e4..b753083 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,4 +30,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0 with: - version: v1.55.2 + version: v1.56.2 From 31ac6b45d981d895863aabb7a32828e9f898169f Mon Sep 17 00:00:00 2001 From: Tom Gehrke Date: Mon, 11 Mar 2024 10:59:18 +0100 Subject: [PATCH 2/4] allow golangci-lint write permissions for PRs --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b753083..22d3590 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,13 @@ on: pull_request: # Declare default permissions as read only. -permissions: read-all +permissions: + # Required: allow read access to the content for analysis. + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + pull-requests: read + # Optional: Allow write access to checks to allow the action to annotate code in the PR. + checks: write jobs: unit_tests: From 3577fe8bb3711e1f8827326b46d472459c039ea7 Mon Sep 17 00:00:00 2001 From: Tom Gehrke Date: Mon, 11 Mar 2024 11:07:38 +0100 Subject: [PATCH 3/4] disable golangci-lint cache --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22d3590..4b63231 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,3 +37,4 @@ jobs: uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0 with: version: v1.56.2 + skip-cache: true From 7f13e5cc94059137ca1fe57660cbc5aec7aee12a Mon Sep 17 00:00:00 2001 From: Tom Gehrke Date: Mon, 11 Mar 2024 11:13:06 +0100 Subject: [PATCH 4/4] run ci workflow on PRs and main branch --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b63231..f0b905c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,8 @@ name: CI on: workflow_call: push: + branches: + - 'main' pull_request: # Declare default permissions as read only.