Skip to content

Commit 526e8a3

Browse files
committed
chore(actions) update golangci-lint version
And use new-from-merge-base option instead of new-from-rev
1 parent b8b1b6f commit 526e8a3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ jobs:
2727
- name: Get golangci-lint configuration file
2828
run: wget --output-document=$(pwd)/.golangci.yml https://sc-devtools.s3.eu-west-1.amazonaws.com/golang-ci/golangci.yml
2929
- name: Get master branch commit ID
30-
id: new-from-rev
31-
run: echo "NEW_FROM_REV=$( git rev-parse origin/master )" >> "$GITHUB_OUTPUT"
30+
id: new-from-merge-base
31+
run: echo "NEW-FROM-MERGE-BASE=$( git rev-parse origin/master )" >> "$GITHUB_OUTPUT"
3232
- name: "Execute golangci-lint on a pull request"
33-
uses: golangci/golangci-lint-action@v6
33+
uses: golangci/golangci-lint-action@v8
3434
with:
3535
# The `only-new-issues` flag is not working (https://github.com/golangci/golangci-lint-action/issues/531).
36-
# We rather decided to use the suggestion from the FAQ (https://golangci-lint.run/welcome/faq/#how-to-integrate-golangci-lint-into-large-project-with-thousands-of-issues) and use `--new-from-rev`
36+
# We rather decided to use the suggestion from the FAQ (https://golangci-lint.run/welcome/faq/#how-to-integrate-golangci-lint-into-large-project-with-thousands-of-issues) and use `--new-from-merge-base`
3737
# only-new-issues: false
38-
args: "--config=$(pwd)/.golangci.yml --new-from-rev=${{ steps.new-from-rev.outputs.NEW_FROM_REV }}"
38+
args: "--config=$(pwd)/.golangci.yml --new-from-merge-base=${{ steps.new-from-merge-base.outputs.NEW-FROM-MERGE-BASE }}"
3939

4040
linter-master:
4141
name: golangci-lint on master branch
@@ -53,12 +53,12 @@ jobs:
5353
- name: Get golangci-lint configuration file
5454
run: wget --output-document=$(pwd)/.golangci.yml https://sc-devtools.s3.eu-west-1.amazonaws.com/golang-ci/golangci.yml
5555
- name: "Execute golangci-lint on the master branch"
56-
uses: golangci/golangci-lint-action@v6
56+
uses: golangci/golangci-lint-action@v8
5757
with:
5858
# The `only-new-issues` flag is not working (https://github.com/golangci/golangci-lint-action/issues/531).
59-
# We rather decided to use the suggestion from the FAQ (https://golangci-lint.run/usage/faq/#how-to-integrate-golangci-lint-into-large-project-with-thousands-of-issues) and use `--new-from-rev`
59+
# We rather decided to use the suggestion from the FAQ (https://golangci-lint.run/usage/faq/#how-to-integrate-golangci-lint-into-large-project-with-thousands-of-issues) and use `--new-from-merge-base`
6060
# only-new-issues: false
61-
args: "--config=$(pwd)/.golangci.yml --new-from-rev=HEAD~1"
61+
args: "--config=$(pwd)/.golangci.yml --new-from-merge-base=HEAD~1"
6262

6363
tests:
6464
name: Unit Tests

0 commit comments

Comments
 (0)