Skip to content

Commit 5aa2181

Browse files
committed
add
1 parent 1d9b151 commit 5aa2181

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ jobs:
2222

2323
# Steps represent a sequence of tasks that will be executed as part of the job
2424
steps:
25-
- name: list of changed files
26-
id: getDiffFile
27-
run: |
28-
echo "::set-output name=files::$(git diff --name-only origin/master | grep '\.go$' | xargs)"
29-
shell: bash
30-
3125
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3226
- uses: actions/checkout@v3
3327
with:
@@ -39,12 +33,23 @@ jobs:
3933
go-version-file: .go-version
4034
#go-version: '1.21'
4135
cache: false
36+
37+
- name: Get list of changed files
38+
id: getDiffFile
39+
run: |
40+
echo "::set-output name=files::$(git diff --name-only origin/master | grep '\.go$' | xargs)"
41+
shell: bash
42+
43+
- name: Print changed files
44+
id: showDiffFile
45+
run: |
46+
echo "Changed Go files: ${{ steps.getDiffFile.outputs.files }}"
4247
4348
# Runs a set of commands using the runners shell
4449
- name: golangci-lint
4550
uses: golangci/golangci-lint-action@v3
4651
with:
47-
version: v1.48.0
52+
version: v1.63.4
4853
#version: v1.54
4954
working-directory: ./tencentcloud
5055
args: --new-from-rev=origin/master -v ${{ steps.getDiffFile.outputs.files }}

0 commit comments

Comments
 (0)