Files
deskflow/.github/workflows/codeql-analysis.yml
Nick Bolton fe16ba63fd Use GitHub vars to determine custom runner names (#7509)
* Use `WINDOWS_RUNNER` var to determine custom runner name

* Remove `if` step

* Change var to `CI_WINDOWS_RUNNER`

* Use other runner vars and fall back to free runners

* Update ChangeLog

* Use `CI_MAC_INTEL_RUNNER`

* Set Mac name depending on var

* Use `CI_LINUX_ARM_RUNNER`

* Change CI var to `CI_ENABLE_PACKAGING`

* Use exclusions to remove ARM runners when var not set

* Switch to `CI_USE_LINUX_ARM_RUNNER` var

* Exclude arm runners if `CI_USE_LINUX_ARM_RUNNER` not set

* Fixed path and actually capture `matrix` as var

* Fixed path

* Add debug step

* Kick build

* Add EOL delimiters

* Move action to composite action for reuse

* Make JSON output pretty

* Add shell prop

* Fixed output var name

* Cleanup debug

* Move debug to same step

* Kick build

* Use `needs` on other jobs

* Also depend unix on setup
2024-09-12 14:12:28 +01:00

58 lines
1.3 KiB
YAML

name: "CodeQL Analysis"
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
branches: [master]
jobs:
analyze:
if: ${{ !github.event.pull_request.draft }}
name: Analyze
runs-on: ${{ vars.CODEQL_RUNNER || 'ubuntu-24.04' }}
container: symless/synergy-core:ubuntu-24.04-amd64
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
language: ["cpp"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Config Git safe dir
run: git config --global --add safe.directory $GITHUB_WORKSPACE
# Should only restore the .venv directory from cache.
- name: Init Python venv
uses: ./.github/actions/init-python
with:
cache-key: "codeql"
setup: false
- name: Install dependencies
run: ./scripts/install_deps.py
env:
# Prevent apt prompting for input.
DEBIAN_FRONTEND: noninteractive
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3