File tree 1 file changed +8
-8
lines changed 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -33,17 +33,17 @@ jobs:
33
33
go-version-file : .go-version
34
34
# go-version: '1.21'
35
35
cache : false
36
+
37
+ - name : Get root path
38
+ id : getRootPath
39
+ run : |
40
+ echo "::set-output path=$(pwd)"
41
+ shell : bash
36
42
37
43
- name : Get list of changed files
38
44
id : getDiffFile
39
45
run : |
40
- prefix=$(pwd)
41
- files=$(git diff --name-only origin/master | grep '^tencentcloud/.*\.go$' | xargs)
42
- files_with_prefix=""
43
- for file in $files; do
44
- files_with_prefix="$files_with_prefix $prefix/$file"
45
- done
46
- echo "::set-output name=files::$files_with_prefix"
46
+ echo "::set-output name=files::$(git diff --name-only origin/master | grep '^tencentcloud/.*\.go$' | xargs)"
47
47
shell : bash
48
48
49
49
- name : Check for changed Go files
64
64
uses : golangci/golangci-lint-action@v3
65
65
with :
66
66
version : v1.63.4
67
- # working-directory: .
67
+ working-directory : ${{ steps.getRootPath.outputs.path }}
68
68
args : --new-from-rev=origin/master -v ${{ steps.getDiffFile.outputs.files }}
69
69
# args: --enable-all --max-same-issues=0 --max-issues-per-linter=0 --new-from-rev=origin/master -v
You can’t perform that action at this time.
0 commit comments