fleet/.github/workflows/codeql-analysis.yml
Zach Wasserman 850d36543d
Filter GitHub actions triggers on file types (#3009)
Reduce the total amount of Actions running by only running actions
relevant to the changes.
2021-11-18 15:14:29 -08:00

55 lines
1.3 KiB
YAML

# Base configuration generated by GitHub
name: "CodeQL"
on:
push:
branches: [ main ]
paths:
- '**.go'
- '**.js'
- '**.jsx'
- '**.ts'
- '**.tsx'
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
paths:
- '**.go'
- '**.js'
- '**.jsx'
- '**.ts'
- '**.tsx'
schedule:
- cron: '18 17 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go', 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
config-file: .github/workflows/config/codeql.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1