mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Optimize CodeQL workflow (#47095)
* Do not run CodeQL analysis when updating .cue file * Remove autobuild step for CodeQL workflow as unecessary * Add specialized CodeQL workflow * Updated main CodeQL workflow to not run on PRs * Simplify CodeQL analysis on PR * Add .tsx file format to JS CodeQL analysis match
This commit is contained in:
31
.github/workflows/pr-codeql-analysis-javascript.yml
vendored
Normal file
31
.github/workflows/pr-codeql-analysis-javascript.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: "CodeQL for PR / javascript"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '**/*.js'
|
||||
- '**/*.ts'
|
||||
- '**/*.tsx'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
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
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: "javascript"
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
Reference in New Issue
Block a user