Skip to content

Commit 80eaabe

Browse files
Merge pull request #72 from skyflowapi/codeql-update
SC-2208 Codeql update
2 parents ac008b0 + 0aab09d commit 80eaabe

File tree

1 file changed

+39
-11
lines changed

1 file changed

+39
-11
lines changed

.github/workflows/codeql-analysis.yml

+39-11
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,63 @@ jobs:
1414
actions: read
1515
contents: read
1616
security-events: write
17-
17+
1818
strategy:
1919
fail-fast: false
2020
matrix:
2121
language: [ 'go' ]
2222

2323
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
2925

3026
steps:
3127
- name: Checkout repository
3228
uses: actions/checkout@v2
3329
with:
3430
# Disabling shallow clone is recommended for improving relevancy of reporting
3531
fetch-depth: 0
36-
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
32+
path: ./
3733

3834
# Initializes the CodeQL tools for scanning.
3935
- name: Initialize CodeQL
40-
uses: github/codeql-action/init@v1
36+
uses: github/codeql-action/init@v2
4137
with:
4238
languages: ${{ matrix.language }}
4339

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+
uses: jsdaniell/[email protected]
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 ./...
4668
4769
- 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

Comments
 (0)