Skip to content

Commit

Permalink
Configure the github release action for private go modules (#12)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
foot authored May 5, 2022
1 parent 235f6d5 commit f882c84
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ on:
push:
tags: [v*.*.*]

env:
GOPRIVATE: github.com/weaveworks/cluster-controller

name: release
jobs:
build:
Expand All @@ -16,7 +19,15 @@ jobs:
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Configure git for private modules
env:
GITHUB_BUILD_USERNAME: ${{ secrets.BUILD_BOT_USER }}
GITHUB_BUILD_TOKEN: ${{ secrets.BUILD_BOT_PERSONAL_ACCESS_TOKEN }}
run: git config --global url."https://${GITHUB_BUILD_USERNAME}:${GITHUB_BUILD_TOKEN}@github.com".insteadOf "https://github.com"
- name: Build docker image
env:
GITHUB_BUILD_USERNAME: ${{ secrets.BUILD_BOT_USER }}
GITHUB_BUILD_TOKEN: ${{ secrets.BUILD_BOT_PERSONAL_ACCESS_TOKEN }}
run: |
make docker-build
- name: Login to Docker Hub
Expand Down

0 comments on commit f882c84

Please sign in to comment.