Update GitHub Actions workflows

This commit is contained in:
Matthew Penner
2020-12-15 15:59:06 -07:00
parent fafda283b1
commit 02034211c1
4 changed files with 74 additions and 58 deletions

View File

@@ -1,30 +1,42 @@
name: CodeQL Scanning
name: CodeQL
on:
push:
branches:
- 'develop'
pull_request:
branches:
- 'develop'
schedule:
- cron: '0 9 * * 4'
jobs:
CodeQL-Build:
runs-on: ubuntu-latest
analyze:
name: Analyze
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
language:
- go
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
- name: Code Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
with:
languages: go
- name: Checkout Head
run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1