Skip to content

Commit f882c84

Browse files
authored
Configure the github release action for private go modules (#12)
* Configure the github release action for private go modules - cluster-controller (private repo) was introduced as a go dep and we need to do the classic git hacks to allow go mod to read the new private repo dependency * Configure docker host's git for private go modules too
1 parent 235f6d5 commit f882c84

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/release.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ on:
22
push:
33
tags: [v*.*.*]
44

5+
env:
6+
GOPRIVATE: github.com/weaveworks/cluster-controller
7+
58
name: release
69
jobs:
710
build:
@@ -16,7 +19,15 @@ jobs:
1619
with:
1720
fetch-depth: 0
1821
ref: ${{ github.event.pull_request.head.sha }}
22+
- name: Configure git for private modules
23+
env:
24+
GITHUB_BUILD_USERNAME: ${{ secrets.BUILD_BOT_USER }}
25+
GITHUB_BUILD_TOKEN: ${{ secrets.BUILD_BOT_PERSONAL_ACCESS_TOKEN }}
26+
run: git config --global url."https://${GITHUB_BUILD_USERNAME}:${GITHUB_BUILD_TOKEN}@github.com".insteadOf "https://github.com"
1927
- name: Build docker image
28+
env:
29+
GITHUB_BUILD_USERNAME: ${{ secrets.BUILD_BOT_USER }}
30+
GITHUB_BUILD_TOKEN: ${{ secrets.BUILD_BOT_PERSONAL_ACCESS_TOKEN }}
2031
run: |
2132
make docker-build
2233
- name: Login to Docker Hub

0 commit comments

Comments
 (0)