Skip to content

Commit

Permalink
Merge pull request sonic-net#331 from hdwhdw/test
Browse files Browse the repository at this point in the history
  • Loading branch information
hdwhdw authored Dec 20, 2024
2 parents 6eade51 + 6bc20a0 commit c6f36b9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- '202[0-9][0-9][0-9]'
workflow_dispatch:

env:
BUILD_BRANCH: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.base.ref || github.ref_name }}


jobs:
analyze:
name: Analyze
Expand All @@ -31,6 +35,20 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

# Checkout sonic-mgmt-common repository which is used by sonic-gnmi
- name: Checkout sonic-mgmt-common repository
uses: actions/checkout@v3
with:
repository: sonic-net/sonic-mgmt-common
path: sonic-mgmt-common
ref: refs/heads/${{ env.BUILD_BRANCH }}

# Update go.mod to use local sonic-mgmt-common.
# This is the same hack used in the CI pipeline. See lgtm.yml.
# We should find a better way to do this.
- name: Update go.mod for sonic-mgmt-common
run: sed -i 's@replace github.com/Azure/sonic-mgmt-common => ../sonic-mgmt-common@replace github.com/Azure/sonic-mgmt-common => ./sonic-mgmt-common@g' go.mod

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/[email protected]
Expand Down

0 comments on commit c6f36b9

Please sign in to comment.