Skip to content

[CHORE] fedora codeql yml conf #8

[CHORE] fedora codeql yml conf

[CHORE] fedora codeql yml conf #8

Workflow file for this run

name: CodeQL Analysis for Anvilock in Fedora
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
codeql:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ "c" ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: CodeQL Analysis in Fedora (Docker)
run: |
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace fedora:latest bash -c "
dnf update -y &&
dnf install -y gcc make cmake wget tar &&
wget https://github.com/github/codeql-cli-binaries/releases/download/v2.15.5/codeql-linux64.tar.gz &&
tar -xzvf codeql-linux64.tar.gz &&
export PATH=\$PATH:/workspace/codeql &&
cd .github/workflows/ &&
chmod +x build-fedora.sh &&
./build-fedora.sh &&
cd /workspace &&
codeql database create cpp-db --language=cpp &&
codeql database analyze cpp-db --format=sarif-latest --output=cpp-analysis.sarif"
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: cpp-analysis.sarif