Seth Flynn 3b7b9fa03c
ci: better filter workflow runs
Signed-off-by: Seth Flynn <getchoo@tuta.io>
2025-04-27 07:30:26 -04:00

80 lines
1.8 KiB
YAML

name: "CodeQL Code Scanning"
on:
push:
# NOTE: `!` doesn't work with `paths-ignore` :(
# So we a catch-all glob instead
# https://github.com/orgs/community/discussions/25369#discussioncomment-3247674
paths:
- "**"
- "!.github/**"
- ".github/workflows/codeql.yml"
- "!flatpak/"
- "!nix/"
- "!scripts/"
- "!.git*"
- "!.envrc"
- "!**.md"
- "COPYING.md"
- "!renovate.json"
pull_request:
# See above
paths:
- "**"
- "!.github/**"
- ".github/workflows/codeql.yml"
- "!flatpak/"
- "!nix/"
- "!scripts/"
- "!.git*"
- "!.envrc"
- "!**.md"
- "COPYING.md"
- "!renovate.json"
workflow_dispatch:
jobs:
CodeQL:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "true"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
config-file: ./.github/codeql/codeql-config.yml
queries: security-and-quality
languages: cpp, java
- name: Install Dependencies
run: sudo apt-get -y update
sudo apt-get -y install ninja-build extra-cmake-modules scdoc
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: "==3.1.*"
py7zrversion: ">=0.20.2"
version: "6.8.1"
host: "linux"
target: "desktop"
arch: ""
modules: "qt5compat qtimageformats qtnetworkauth"
tools: ""
- name: Configure and Build
run: |
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr -G Ninja
cmake --build build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3