@@ -14,35 +14,63 @@ jobs:
14
14
actions : read
15
15
contents : read
16
16
security-events : write
17
-
17
+
18
18
strategy :
19
19
fail-fast : false
20
20
matrix :
21
21
language : [ 'go' ]
22
22
23
23
env :
24
- GOPATH : ${{ github.workspace }}
25
-
26
- defaults :
27
- run :
28
- working-directory : ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
24
+ GOBIN : ${{ github.workspace }}/bin
29
25
30
26
steps :
31
27
- name : Checkout repository
32
28
uses : actions/checkout@v2
33
29
with :
34
30
# Disabling shallow clone is recommended for improving relevancy of reporting
35
31
fetch-depth : 0
36
- path : ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
32
+ path : ./
37
33
38
34
# Initializes the CodeQL tools for scanning.
39
35
- name : Initialize CodeQL
40
- uses : github/codeql-action/init@v1
36
+ uses : github/codeql-action/init@v2
41
37
with :
42
38
languages : ${{ matrix.language }}
43
39
44
- - name : Autobuild
45
- uses : github/codeql-action/autobuild@v1
40
+ - name : Set up Go
41
+ uses : actions/setup-go@v2
42
+ with :
43
+ go-version : 1.15
44
+
45
+ - name : create-json
46
+ id : create-json
47
+
48
+ with :
49
+ name : " credentials.json"
50
+ json : ${{ secrets.CREDENTIALS_FILE_STR }}
51
+
52
+ - name : ' Setup .env'
53
+ run : |
54
+ touch .env
55
+ echo CREDENTIALS_FILE_PATH=../../credentials.json >> .env
56
+ echo EXPIRED_TOKEN=${{secrets.EXPIRED_TOKEN}} >> .env
57
+ echo VALID_CREDS_PVT_KEY=${{secrets.VALID_CREDS_PVT_KEY}} >> .env
58
+ echo CREDENTIALS_FILE_STR=${{secrets.CREDENTIALS_FILE_STR}} >> .env
59
+
60
+ - name : Build
61
+ run : |
62
+ cd commonutils
63
+ go build -v ./...
64
+ cd ../serviceaccount
65
+ go build -v ./...
66
+ cd ../skyflow
67
+ go build -v ./...
46
68
47
69
- name : Perform CodeQL Analysis
48
- uses : github/codeql-action/analyze@v1
70
+ uses : github/codeql-action/analyze@v2
71
+
72
+ - name : Upload SARIF Results
73
+ uses : actions/upload-artifact@v2
74
+ with :
75
+ name : sarif-results
76
+ path : /home/runner/work/skyflow-go/results/go.sarif
0 commit comments