Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: CodeQL
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
on:
pull_request:
branches:
- main
paths-ignore:
- "docs/**"
push:
branches:
- main
paths-ignore:
- "docs/**"
schedule:
- cron: "17 4 * * 1"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for this? 😄

permissions:
contents: read
env:
GOTOOLCHAIN: local
GOFLAGS: "-tags=nowatcher,nobadger,nomysql,nopgx"
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: c-cpp
build-mode: manual
- language: go
build-mode: manual
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- if: matrix.build-mode == 'manual'
uses: ./.github/actions/setup-go
with:
# A warm build cache skips the compiler calls the extractors trace
cache: "false"
- if: matrix.build-mode == 'manual'
uses: ./.github/actions/setup-php
- name: Install libbrotli-dev
if: matrix.build-mode == 'manual'
run: sudo apt-get install -y libbrotli-dev
- name: Set CGO flags
if: matrix.build-mode == 'manual'
run: echo "CGO_CFLAGS=$(php-config --includes)" >> "${GITHUB_ENV}"
- uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Build
if: matrix.build-mode == 'manual'
run: go build ./...
- name: Build Caddy module
if: matrix.build-mode == 'manual'
working-directory: caddy/
run: go build ./...
- uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
with:
category: /language:${{ matrix.language }}
Loading