-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use an access token for builds & docker
- Loading branch information
1 parent
2dfad25
commit 281d1b6
Showing
3 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,12 +23,10 @@ jobs: | |
env: | ||
GOOS: ${{ matrix.targetos }} | ||
GOARCH: ${{ matrix.arch }} | ||
|
||
- name: Set GOPRIVATE for private repositories | ||
run: echo "export GOPRIVATE=github.com/ojo-network/indexer" >> $GITHUB_ENV | ||
- name: Set GOPRIVATE for private repository | ||
run: go env -w GOPRIVATE=github.com/ojo-network/example-repo | ||
|
||
GOPRIVATE: github.com/ojo-network/indexer | ||
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
- name: Set up git config for the private repo | ||
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ | ||
- name: Compile | ||
run: | | ||
go mod download | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
# Build Image | ||
FROM golang:1.20-alpine AS builder | ||
|
||
ARG GH_ACCESS_TOKEN | ||
|
||
RUN apk add --no-cache build-base git | ||
|
||
WORKDIR /app | ||
|
||
COPY go.mod go.sum ./ | ||
COPY .netrc /root/.netrc | ||
|
||
RUN git config --global url."https://${GH_ACCESS_TOKEN}:[email protected]/".insteadOf "https://github.com/" | ||
ENV export GOPRIVATE=github.com/ojo-network/indexer | ||
|
||
RUN go mod download | ||
|