Skip to content

Commit

Permalink
ci: Separate CodeQL jobs depending on changed paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed Oct 13, 2023
1 parent 720cef1 commit 6cd1696
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
name: "CodeQL"
name: CodeQL Backend

on:
push:
branches: [ master, develop ]
branches:
- master
paths:
- backend/**
pull_request:
branches: [ master, develop ]
branches:
- master
paths:
- backend/**

jobs:
analyze-js:
name: Analyze JavaScript
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
analyze-java:
name: Analyze Java
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend/
permissions:
actions: read
contents: read
Expand All @@ -39,6 +30,7 @@ jobs:
uses: github/codeql-action/init@v2
with:
languages: java
source-root: backend/
- name: Setup Java
uses: actions/setup-java@v3
with:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/codeql-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CodeQL Frontend

on:
push:
branches:
- master
paths:
- frontend/**
pull_request:
branches:
- master
paths:
- frontend/**

jobs:
analyze-js:
name: Analyze JavaScript
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend/
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript
source-root: frontend/
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
37 changes: 37 additions & 0 deletions .github/workflows/codeql-services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CodeQL Services

on:
push:
branches:
- master
paths:
- services/**
pull_request:
branches:
- master
paths:
- services/**

jobs:
analyze-js:
name: Analyze JavaScript
runs-on: ubuntu-latest
defaults:
run:
working-directory: services/
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript
source-root: services/
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

0 comments on commit 6cd1696

Please sign in to comment.