Files
directus/.github/workflows/codeql-analysis.yml
Rijk van Zanten 421e3e8f9f Only run CI against files that changed (#20365)
* Only run eslint against the files that have changed

* Don't build for eslint?

* Only run unit tests against changed files

* Fix unit test runner

* Run CodeQL daily, not on PR

* Checkout base ref for vitest to be able to check

* Inching closer

* Trial and error is my favorite

* With origin?

* Is this still needed?

* Does this work?

* It needs the whole fetch depth

Without it, the current HEAD doesn't have a shared base which causes a "no merge base" error

* Add comment to ensure we don't remove this later
2023-11-08 15:57:46 -05:00

55 lines
1.1 KiB
YAML

name: CodeQL Analysis
on:
workflow_call:
schedule:
- cron: '0 0 * * *'
env:
NODE_OPTIONS: --max_old_space_size=6144
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: true
matrix:
language:
- javascript
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Prepare
uses: ./.github/actions/prepare
with:
build: false
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
config-file: ./.github/codeql/codeql-config.yml
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v2
with:
upload: false
output: sarif-results
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: sarif-results
path: sarif-results
retention-days: 1
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: sarif-results/javascript.sarif