Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: CodeQL Running Too Often #135

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
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
45 changes: 45 additions & 0 deletions .github/workflows/backend_codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Backend CodeQL

on:
push:
branches: ["main"]
paths:
- "backend/**"
- ".github/workflows/backend_codeql.yml"
pull_request:
branches: ["main"]
paths:
- "backend/**"
- ".github/workflows/backend_codeql.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "go"
queries: security-and-quality
- name: Build
run: |
cd ./backend/ && go build -o backend src/main.go
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:go"
45 changes: 45 additions & 0 deletions .github/workflows/cli_codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CLI CodeQL

on:
push:
branches: ["main"]
paths:
- "cli/**"
- ".github/workflows/cli_codeql.yml"
pull_request:
branches: ["main"]
paths:
- "cli/**"
- ".github/workflows/cli_codeql.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "go"
queries: security-and-quality
- name: Build
run: |
cd ./cli/ && go build -o cli main.go
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:go"
98 changes: 0 additions & 98 deletions .github/workflows/codeql.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/mobile_codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Mobile CodeQL

on:
push:
branches: ["main"]
paths:
- "frontend/sac-mobile/**"
- ".github/workflows/mobile_codeql.yml"
pull_request:
branches: ["main"]
paths:
- "frontend/sac-mobile/**"
- ".github/workflows/mobile_codeql.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "javascript-typescript"
queries: security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v3
with:
working-directory: frontend/sac-mobile
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:javascript-typescript"
42 changes: 42 additions & 0 deletions .github/workflows/web_codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Web CodeQL

on:
push:
branches: ["main"]
paths:
- "frontend/sac-web/**"
- ".github/workflows/mweb_codeql.yml"
pull_request:
branches: ["main"]
paths:
- "frontend/sac-web/**"
- ".github/workflows/web_codeql.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "javascript-typescript"
queries: security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v3
with:
working-directory: frontend/sac-web
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:javascript-typescript"
Loading