Skip to content

Commit 4ef7530

Browse files
committed
fix: add GOPRIVATE and RELENG_GITHUB_TOKEN for private module access
golangci-lint and go test fail when the caller repo depends on private ConductorOne modules like baton-http. This adds: - GOPRIVATE=github.com/conductorone/* to skip go proxy - Optional RELENG_GITHUB_TOKEN secret for private repo access - git config step only runs when token is provided Fixes lint errors on baton-http based connectors (36 repos)
1 parent baa0422 commit 4ef7530

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/verify.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ on:
88
required: false
99
type: boolean
1010
default: true
11+
secrets:
12+
RELENG_GITHUB_TOKEN:
13+
required: false
1114
jobs:
1215
lint:
1316
runs-on: ubuntu-latest
17+
env:
18+
GOPRIVATE: github.com/conductorone/*
1419
steps:
1520
- name: Checkout caller repo
1621
uses: actions/checkout@v5
@@ -19,6 +24,9 @@ jobs:
1924
repository: ${{ github.event.repository.full_name }}
2025
fetch-depth: 0
2126
ref: ${{ inputs.ref }}
27+
- name: Configure git for private modules
28+
if: ${{ secrets.RELENG_GITHUB_TOKEN != '' }}
29+
run: git config --global url."https://${{ secrets.RELENG_GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
2230
- name: Install Go
2331
uses: actions/setup-go@v5
2432
with:
@@ -35,13 +43,18 @@ jobs:
3543
matrix:
3644
platform: [ubuntu-latest]
3745
runs-on: ${{ matrix.platform }}
46+
env:
47+
GOPRIVATE: github.com/conductorone/*
3848
steps:
3949
- name: Checkout caller repo
4050
uses: actions/checkout@v5
4151
with:
4252
repository: ${{ github.event.repository.full_name }}
4353
fetch-depth: 0
4454
ref: ${{ inputs.ref }}
55+
- name: Configure git for private modules
56+
if: ${{ secrets.RELENG_GITHUB_TOKEN != '' }}
57+
run: git config --global url."https://${{ secrets.RELENG_GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
4558
- name: Install Go
4659
uses: actions/setup-go@v5
4760
with:
@@ -53,4 +66,3 @@ jobs:
5366
uses: guyarb/golang-test-annotations@v0.8.0
5467
with:
5568
test-results: test.json
56-

0 commit comments

Comments
 (0)