Files
MaaAssistantArknights/.github/workflows/codeql-js.yml
Constrat 4489797eed ci: split codeql (#13812)
* perf: codeql core

* perf: standardize caching for codeqlcore

* fix: correct cache keys

* perf: add codeql-js for website and workflows

* fix: typo

* fix: use bash instead of pwsh in ubuntu
2025-08-20 23:14:16 +02:00

73 lines
1.8 KiB
YAML

name: "CodeQL Website and Workflows Analysis"
on:
pull_request:
branches: ["dev"]
paths:
- "website/**"
- ".github/workflows/*.yml"
- ".github/*.yml"
- "!**/*.md"
schedule:
- cron: "00 12 * * *" # Runs daily at 12:00 UTC
workflow_dispatch:
permissions:
actions: write
contents: read
security-events: write
jobs:
analyze-website:
name: Analyze Website (JavaScript/TypeScript)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
show-progress: false
- name: Setup CodeQL for JavaScript/TypeScript
uses: github/codeql-action/init@v3
with:
languages: javascript-typescript
build-mode: none
- name: Run CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:multi-none"
- name: Delete old caches
shell: bash
run: |
oldCaches=$(gh cache list --key codeql --order asc --json key | jq -r '.[] | .key' | head -n -1)
for cache in $oldCaches; do
if [ -n "$cache" ]; then
echo "Deleting cache: $cache"
gh cache delete "$cache" --confirm
fi
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
analyze-workflows:
name: Analyze GitHub Workflows
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
show-progress: false
- name: Setup CodeQL for GitHub Actions
uses: github/codeql-action/init@v3
with:
languages: actions
build-mode: none
- name: Run CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:multi-none"