Skip to content

Commit

Permalink
Setup Codeql workflow (#2381)
Browse files Browse the repository at this point in the history
* Setup Codeql workflow

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

* clean unused default config

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

---------

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
  • Loading branch information
mmorel-35 authored Jan 3, 2024
1 parent b285e77 commit 90f1905
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ updates:
directory: /
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: /tools/github-actions/setup-deps
schedule:
interval: weekly
- package-ecosystem: gomod
directory: /
schedule:
Expand Down
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"
schedule:
- cron: '16 11 * * 5'

permissions:
contents: read


jobs:
analyze:
name: Analyze
runs-on: 'ubuntu-22.04'
timeout-minutes: 360
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language:
- go

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./tools/github-actions/setup-deps

- name: Initialize CodeQL
uses: github/codeql-action/init@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion tools/github-actions/setup-deps/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Install host system dependencies
runs:
using: composite
steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: 1.21.x
cache: true

0 comments on commit 90f1905

Please sign in to comment.