Skip to content

Commit

Permalink
Integrate CodeQL (#182)
Browse files Browse the repository at this point in the history
* [CI] Add CodeQL workflow

* Configure ARTIFACT_DIR env var

* Enable tests

* Remove redundant triggers

* Use softprops/action-gh-release@v2

* Add dependabot.yml for GHA

* Add write permissions for softprops/action-gh-release@v2
  • Loading branch information
iamazeem authored Aug 13, 2024
1 parent 2b3b4db commit 41e7aa8
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:

runs-on: ${{ matrix.os }}

permissions:
contents: write

env:
TAG: "0.3.6"
AMD64_LINUX_GCC: amd64-linux-gcc
Expand Down Expand Up @@ -342,7 +345,7 @@ jobs:
# --- Upload release artifacts ---

- name: Upload release artifacts
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
files: |
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: codeql

on: workflow_dispatch

jobs:
codeql:
runs-on: ubuntu-20.04
permissions:
security-events: write

steps:
- name: Checkout [${{ github.repository }}]
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: c
build-mode: manual

- name: Build
env:
PREFIX: amd64-linux-gcc
CC: gcc
MAKE: make
ARTIFACT_DIR: .artifacts
RUN_TESTS: true
shell: bash
run: ./scripts/ci-build.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

0 comments on commit 41e7aa8

Please sign in to comment.