File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,11 @@ jobs:
189189 - name : build image
190190 run : make -j build/image/envbox
191191
192+ # We don't want to run Trivy on pull requests.
193+ - name : Exit if not on main
194+ if : github.ref != 'refs/heads/main'
195+ run : exit 0
196+
192197 - name : Run Trivy vulnerability scanner
193198 uses : aquasecurity/trivy-action@0.29.0
194199 with :
@@ -215,11 +220,6 @@ jobs:
215220 steps :
216221 - uses : actions/checkout@v3
217222
218- - name : Initialize CodeQL
219- uses : github/codeql-action/init@v2
220- with :
221- languages : go
222-
223223 - name : Setup Go
224224 uses : actions/setup-go@v3
225225 with :
@@ -236,6 +236,11 @@ jobs:
236236 path : ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
237237 key : ${{ runner.os }}-release-go-mod-${{ hashFiles('**/go.sum') }}
238238
239+ - name : Initialize CodeQL
240+ uses : github/codeql-action/init@v2
241+ with :
242+ languages : go
243+
239244 - name : Perform CodeQL Analysis
240245 uses : github/codeql-action/analyze@v2
241246
You can’t perform that action at this time.
0 commit comments