mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-26 16:09:45 -05:00
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@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
|
|
|
|
- name: Setup Go environment
|
|
if: matrix.language == 'go'
|
|
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
|
|
with:
|
|
go-version: "1.20.3"
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
|
|
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
|
|
go mod download -C "$mod"
|
|
done
|
|
echo "::endgroup::"
|
|
|
|
- name: Autobuild
|
|
uses: github/codeql-action/autobuild@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
|
|
with:
|
|
category: "/language:${{ matrix.language }}"
|