Skip to content

Commit 5756229

Browse files
authored
fix(provider): [123456789] fix golang ci lint (#3058)
* add * add * add
1 parent 1d9b151 commit 5756229

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 20 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,31 @@ 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 '^tencentcloud/.*\.go$' | xargs)"
41+
shell: bash
42+
43+
- name: Check for changed Go files
44+
id: checkDiffFile
45+
run: |
46+
if [ -z "${{ steps.getDiffFile.outputs.files }}" ]; then
47+
echo "No Go files changed."
48+
exit 0
49+
fi
50+
51+
- name: Print changed files
52+
id: showDiffFile
53+
run: |
54+
echo "Changed Go files: ${{ steps.getDiffFile.outputs.files }}"
4255
4356
# Runs a set of commands using the runners shell
4457
- name: golangci-lint
4558
uses: golangci/golangci-lint-action@v3
4659
with:
47-
version: v1.48.0
60+
version: v1.63.4
4861
#version: v1.54
4962
working-directory: ./tencentcloud
5063
args: --new-from-rev=origin/master -v ${{ steps.getDiffFile.outputs.files }}

0 commit comments

Comments
 (0)