Skip to content

Commit dc58d8c

Browse files
committed
refactor(ci): integrate codeql analysis into build job
- Adds CodeQL init and analyze steps directly into the 'build' job. - Leverages the existing devcontainer build step to ensure CodeQL analyzes the correctly built code. - Consolidates CI into a more efficient, single-job workflow for building and scanning.
1 parent 7342afa commit dc58d8c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ env:
2626
jobs:
2727
build:
2828
runs-on: ubuntu-latest
29+
permissions:
30+
contents: read
31+
security-events: write
2932
steps:
3033
- name: Checkout (GitHub)
3134
uses: actions/checkout@v5
@@ -37,15 +40,21 @@ jobs:
3740
with:
3841
node-version: ${{ env.NODE_VERSION }}
3942
cache: 'npm'
43+
- name: Initialize CodeQL
44+
uses: github/codeql-action/init@v4
45+
with:
46+
languages: go, javascript-typescript, actions
4047
- name: Get Repo Owner
4148
id: get_repo_owner
4249
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV
43-
- name: Run precommit target for CI
50+
- name: Run build and precommit for CI
4451
uses: devcontainers/[email protected]
4552
with:
4653
cacheFrom: ghcr.io/${{ env.REPO_OWNER }}/webstatus-dev-devcontainer-ci-precommit
4754
push: never
48-
runCmd: make precommit
55+
runCmd: make gen && make precommit
56+
- name: Perform CodeQL Analysis
57+
uses: github/codeql-action/analyze@v4
4958
playwright:
5059
runs-on: ubuntu-latest
5160
steps:

0 commit comments

Comments
 (0)