File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Lint 
2+ 
3+ on :
4+   push :
5+     branches :
6+       - main 
7+   pull_request :
8+   workflow_dispatch :
9+ 
10+ permissions :
11+   contents : read 
12+ 
13+ jobs :
14+   test-go :
15+     runs-on : ubuntu-latest 
16+     timeout-minutes : 5 
17+     steps :
18+ 19+       - uses : actions/setup-go@v2 
20+         with :
21+           go-version : 1.22.8 
22+ 
23+ 
24+       - name : Get golangci-lint cache dir 
25+         run : | 
26+           linter_ver=1.55.2 
27+           go install github.com/golangci/golangci-lint/cmd/golangci-lint@v$linter_ver 
28+           dir=$(golangci-lint cache status | awk '/Dir/ { print $2 }') 
29+           echo "LINT_CACHE_DIR=$dir" >> $GITHUB_ENV 
30+ 
31+        - name : golangci-lint cache 
32+         uses : actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2  #  v4.1.0
33+         with :
34+           path : | 
35+             ${{ env.LINT_CACHE_DIR }} 
36+            key : golangci-lint-${{ runner.os }}-${{ hashFiles('**/*.go') }} 
37+           restore-keys : | 
38+             golangci-lint-${{ runner.os }}- 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments