mirror of https://github.com/grafana/grafana
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 matchpull/46068/head
parent
cb03b05ced
commit
3e9dfcd730
@ -0,0 +1,29 @@ |
|||||||
|
name: "CodeQL for PR / go" |
||||||
|
|
||||||
|
on: |
||||||
|
pull_request: |
||||||
|
branches: [main] |
||||||
|
paths: |
||||||
|
- '**/*.go' |
||||||
|
|
||||||
|
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: "go" |
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis |
||||||
|
uses: github/codeql-action/analyze@v1 |
@ -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 |
@ -0,0 +1,29 @@ |
|||||||
|
name: "CodeQL for PR / python" |
||||||
|
|
||||||
|
on: |
||||||
|
pull_request: |
||||||
|
branches: [main] |
||||||
|
paths: |
||||||
|
- '**/*.py' |
||||||
|
|
||||||
|
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: "python" |
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis |
||||||
|
uses: github/codeql-action/analyze@v1 |
Loading…
Reference in new issue