Skip to content

Commit

Permalink
Create codeql.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jentfoo authored Dec 18, 2024
1 parent c324e6f commit 91198c9
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
security-events: write
packages: read
actions: read
contents: read

strategy:
fail-fast: false
matrix:
language: [ 'go' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
cache: false
go-version-file: go.mod
if: ${{ matrix.language == 'go' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
timeout-minutes: 10

- name: Autobuild (${{ matrix.language }})
uses: github/codeql-action/autobuild@v3
timeout-minutes: 10

- name: Perform CodeQL Analysis (${{ matrix.language }})
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
timeout-minutes: 10

0 comments on commit 91198c9

Please sign in to comment.