Skip to content

Commit

Permalink
Skip Golang code analysis (CodeQL) for documentation changes (antrea-…
Browse files Browse the repository at this point in the history
…io#6285)

Signed-off-by: Antonin Bas <[email protected]>
  • Loading branch information
antoninbas authored May 6, 2024
1 parent f0d0a6b commit 26e8441
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,24 @@ on:
branches: [ "main" ]

jobs:
check-changes:
name: Check whether tests need to be run based on diff
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- uses: antrea-io/has-changes@v2
id: check_diff
with:
paths-ignore: docs/* ci/jenkins/* *.md hack/.notableofcontents
outputs:
has_changes: ${{ steps.check_diff.outputs.has_changes }}

analyze-on-linux:
needs: check-changes
if: ${{ needs.check-changes.outputs.has_changes == 'yes' }}
name: Analyze on Linux
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -50,6 +67,8 @@ jobs:
category: "/language:${{matrix.language}}"

analyze-on-windows:
needs: check-changes
if: ${{ needs.check-changes.outputs.has_changes == 'yes' }}
name: Analyze on Windows
runs-on: windows-latest
permissions:
Expand Down

0 comments on commit 26e8441

Please sign in to comment.