mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
17ff8c43d7
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
name: CodeQL
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- "release/**"
|
|
paths:
|
|
- "**.go"
|
|
- "**/go.mod"
|
|
- "**/go.sum"
|
|
- "**.py"
|
|
- "**requirements.txt"
|
|
- "./github/workflows/codeql.yml"
|
|
|
|
jobs:
|
|
codeql:
|
|
name: CodeQL
|
|
runs-on: ubuntu-22.04
|
|
permissions:
|
|
actions: read
|
|
contents: read
|
|
security-events: write
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
language: ["go", "python"]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
|
|
|
- name: Setup Go environment
|
|
if: matrix.language == 'go'
|
|
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
|
|
with:
|
|
go-version: "1.19.5"
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@3ebbd71c74ef574dbc558c82f70e52732c8b44fe # v2.2.1
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
|
|
- name: Install Go Dependencies
|
|
if: matrix.language == 'go'
|
|
run: |
|
|
echo "::group::Install apt dependencies"
|
|
sudo apt-get update && sudo apt-get install -y libcryptsetup12 libcryptsetup-dev libvirt-dev
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::Install go dependencies"
|
|
mods=$(go list -f '{{.Dir}}' -m | xargs)
|
|
for mod in $mods; do
|
|
(cd "$mod" || exit; go mod download)
|
|
done
|
|
echo "::endgroup::"
|
|
|
|
- name: Autobuild
|
|
uses: github/codeql-action/autobuild@3ebbd71c74ef574dbc558c82f70e52732c8b44fe # v2.2.1
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@3ebbd71c74ef574dbc558c82f70e52732c8b44fe # v2.2.1
|
|
with:
|
|
category: "/language:${{ matrix.language }}"
|