Files
donutbrowser/.github/workflows/codeql.yml
T
2026-12-03 15:32:25 +04:00

82 lines
2.5 KiB
YAML

name: "CodeQL"
# Pushes to main reach this through rolling-release.yml and tags through
# release.yml. A push trigger of its own analyzed each push to main twice.
on:
workflow_call: {}
pull_request:
branches: ["main"]
paths-ignore:
- "**/*.md"
- "LICENSE"
- "assets/**"
- ".github/ISSUE_TEMPLATE/**"
schedule:
- cron: "16 13 * * 5"
permissions:
contents: read
concurrency:
# A called workflow sees its caller's `github.workflow`, so the literal
# prefix keeps this group apart from the caller's own.
group: codeql-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 45
permissions:
security-events: write
packages: read
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
- language: rust
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
with:
persist-credentials: false
# Only the JavaScript analysis reads node_modules (for type information).
- name: Set up pnpm package manager
if: matrix.language == 'javascript-typescript'
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 #v6.1.1
with:
run_install: false
- name: Set up Node.js
if: matrix.language == 'javascript-typescript'
uses: actions/setup-node@8fccf151e3ba8038c300f83b40c8fd1e94f9c5ce #v7.2.0
with:
node-version-file: .node-version
cache: "pnpm"
- name: Install dependencies from lockfile
if: matrix.language == 'javascript-typescript'
run: pnpm install --frozen-lockfile
- name: Initialize CodeQL
uses: github/codeql-action/init@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5
with:
config-file: ./.github/codeql/codeql-config.yml
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5
with:
category: "/language:${{matrix.language}}"