Merge pull request #6386 from kzys/codeql-pr

gha: run CodeQL scan on pull requests
This commit is contained in:
Phil Estes 2022-01-18 13:52:13 -05:00 committed by GitHub
commit 2b8386e0d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,11 +2,13 @@ name: "CodeQL Scan"
on: on:
push: push:
schedule: branches:
- cron: '0 0 * * 0' - main
- 'release/**'
pull_request: pull_request:
paths: branches:
- '.github/workflows/codeql.yml' - main
- 'release/**'
jobs: jobs:
CodeQL-Build: CodeQL-Build:
@ -22,6 +24,10 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.17.5
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v1
@ -29,21 +35,9 @@ jobs:
# with: # with:
# languages: go, javascript, csharp, python, cpp, java # languages: go, javascript, csharp, python, cpp, java
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - run: |
# If this step fails, then you should remove it and run the build manually (see below). sudo apt-get install -y libseccomp-dev libbtrfs-dev
- name: Autobuild make
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v1