Skip to content

Commit f151311

Browse files
Beer van der DriftBeer van der Drift
authored andcommitted
ci: authenticate git for the private staging Go SDK repo
1 parent b2e8c8c commit f151311

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2929

30+
- name: Authenticate git for the private Go SDK repo
31+
if: github.repository == 'context-dot-dev/context-dev-cli-staging'
32+
env:
33+
GO_MODULE_REPO: context-dot-dev/context-go-sdk-staging
34+
GO_REPO_READ_TOKEN: ${{ secrets.GO_REPO_READ_TOKEN }}
35+
run: |
36+
git config --global url."https://x-access-token:${GO_REPO_READ_TOKEN}@github.com/${GO_MODULE_REPO}".insteadOf "https://github.com/${GO_MODULE_REPO}"
37+
3038
- uses: ./.github/actions/setup-go
3139
with:
3240
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
@@ -53,6 +61,14 @@ jobs:
5361
steps:
5462
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5563

64+
- name: Authenticate git for the private Go SDK repo
65+
if: github.repository == 'context-dot-dev/context-dev-cli-staging'
66+
env:
67+
GO_MODULE_REPO: context-dot-dev/context-go-sdk-staging
68+
GO_REPO_READ_TOKEN: ${{ secrets.GO_REPO_READ_TOKEN }}
69+
run: |
70+
git config --global url."https://x-access-token:${GO_REPO_READ_TOKEN}@github.com/${GO_MODULE_REPO}".insteadOf "https://github.com/${GO_MODULE_REPO}"
71+
5672
- uses: ./.github/actions/setup-go
5773
with:
5874
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
@@ -100,6 +116,14 @@ jobs:
100116
steps:
101117
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
102118

119+
- name: Authenticate git for the private Go SDK repo
120+
if: github.repository == 'context-dot-dev/context-dev-cli-staging'
121+
env:
122+
GO_MODULE_REPO: context-dot-dev/context-go-sdk-staging
123+
GO_REPO_READ_TOKEN: ${{ secrets.GO_REPO_READ_TOKEN }}
124+
run: |
125+
git config --global url."https://x-access-token:${GO_REPO_READ_TOKEN}@github.com/${GO_MODULE_REPO}".insteadOf "https://github.com/${GO_MODULE_REPO}"
126+
103127
- uses: ./.github/actions/setup-go
104128
with:
105129
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}

0 commit comments

Comments
 (0)