Files
MaaAssistantArknights/.github/workflows/codeql-web.yml
2025-09-10 16:25:55 +02:00

51 lines
1.2 KiB
YAML

name: "CodeQL Website Analysis"
on:
pull_request:
branches: ["dev"]
paths:
- "website/**"
- "!**/*.md"
schedule:
- cron: "10 12 * * *" # Runs daily at 12:10 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@v5
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 }}