diff --git a/.github/workflows/go-ci.yaml b/.github/workflows/go-ci.yaml index f97ebea..2836440 100644 --- a/.github/workflows/go-ci.yaml +++ b/.github/workflows/go-ci.yaml @@ -104,6 +104,8 @@ jobs: vuln-scan: runs-on: ubuntu-latest + env: + GOPRIVATE: "${{ inputs.go-private }}" steps: - name: Checkout code uses: actions/checkout@v4 @@ -115,6 +117,11 @@ jobs: exit-code: "1" ignore-unfixed: true vuln-type: "library" + + - name: Setup private repository access + if: inputs.go-private != '' + run: git config --global url."https://${{ secrets.gh_username }}:${{ secrets.gh_token }}@github.com".insteadOf "https://github.com" + - name: Run govulncheck uses: golang/govulncheck-action@v1 with: