mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-10-19 22:17:28 +02:00
82 lines
2.4 KiB
YAML
82 lines
2.4 KiB
YAML
name: "CodeQL"
|
|
|
|
on:
|
|
workflow_call: {}
|
|
push:
|
|
branches: ["main"]
|
|
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' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
|
|
|
|
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@ea17c68df8912ef543352723c149a84f56e3d413 #v6.1.0
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Set up Node.js
|
|
if: matrix.language == 'javascript-typescript'
|
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 #v7.0.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@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
|
|
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@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
|
|
with:
|
|
category: "/language:${{matrix.language}}"
|