Skip to content

Commit

Permalink
fix(ci): CodeQL warning (2) (aquasecurity#4618)
Browse files Browse the repository at this point in the history
"An imported package is intended for a different OS or architecture."
  • Loading branch information
geyslan authored Feb 20, 2025
1 parent 97995f3 commit 0933463
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
env:
GOOS: linux
GOARCH: ${{ matrix.goarch }}
permissions:
security-events: write
packages: read
Expand All @@ -26,13 +23,13 @@ jobs:
strategy:
fail-fast: false
matrix:
goarch: [amd64]
language: [c-cpp, go]
include:
- language: c-cpp
build-mode: autobuild
- language: go
build-mode: autobuild
build-mode: manual
goarch: amd64

steps:
- name: Checkout repository
Expand All @@ -46,12 +43,23 @@ jobs:
- name: Update submodules
run: git submodule update --init --recursive

- name: Set GO Environment (for Go only)
if: matrix.language == 'go'
run: |
echo "GOOS=linux" >> $GITHUB_ENV
echo "GOARCH=${{ matrix.goarch }}" >> $GITHUB_ENV
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Manual Build for Go
if: matrix.language == 'go'
run: |
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
Expand Down

0 comments on commit 0933463

Please sign in to comment.