Skip to content

Commit

Permalink
use the CI sed hack to go can find the path of sonic-mgmt-common.
Browse files Browse the repository at this point in the history
  • Loading branch information
hdwhdw committed Dec 18, 2024
1 parent e8bc547 commit ff18bcd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,21 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

# Checkout sonic-mgmt-common repository which sonic-gnmi depends on.
# 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
# build requires sonic-mgmt-common to be in the same directory as sonic-gnmi.
path: ../sonic-mgmt-common
path: sonic-mgmt-common
# Checkout the branch that is being merged into
ref: ${{ github.event.pull_request.base.ref }}

# 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 ff18bcd

Please sign in to comment.