From b75bbae88ee2e4fa9e041e831a5a28ad2b0b5c06 Mon Sep 17 00:00:00 2001 From: Alok Kumar Singh Date: Fri, 26 Aug 2022 15:58:33 +0530 Subject: [PATCH] Git creds is required to pull in private repos --- .github/workflows/tests.yaml | 5 +++++ .gitignore | 3 +++ Makefile | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ac92d1b..0ec2e38 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -16,6 +16,11 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 + - uses: extractions/netrc@v1 + with: + machine: github.com + username: rzp + password: ${{ secrets.GIT_TOKEN }} - name: Build run: go build -v ./... - name: Test diff --git a/.gitignore b/.gitignore index bdc899b..774cebc 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ /.dockerfile-* /.licenses /.buildx-initialized + +# ide +.vscode \ No newline at end of file diff --git a/Makefile b/Makefile index 378986b..c86f53e 100644 --- a/Makefile +++ b/Makefile @@ -170,6 +170,7 @@ go-build: | $(BUILD_DIRS) -v $$(pwd)/.go/bin/$(OS)_$(ARCH):/go/bin/$(OS)_$(ARCH) \ -v $$(pwd)/.go/cache:/.cache \ -v $$(pwd)/.go/pkg:/go/pkg \ + -v $${HOME}/.netrc:/.netrc \ --env ARCH=$(ARCH) \ --env OS=$(OS) \ --env VERSION=$(VERSION) \ @@ -194,6 +195,7 @@ shell: | $(BUILD_DIRS) -v $$(pwd)/.go/bin/$(OS)_$(ARCH):/go/bin/$(OS)_$(ARCH) \ -v $$(pwd)/.go/cache:/.cache \ -v $$(pwd)/.go/pkg:/go/pkg \ + -v $${HOME}/.netrc:/.netrc \ --env ARCH=$(ARCH) \ --env OS=$(OS) \ --env VERSION=$(VERSION) \ @@ -307,6 +309,7 @@ test: | $(BUILD_DIRS) -v $$(pwd)/.go/bin/$(OS)_$(ARCH):/go/bin/$(OS)_$(ARCH) \ -v $$(pwd)/.go/cache:/.cache \ -v $$(pwd)/.go/pkg:/go/pkg \ + -v $${HOME}/.netrc:/.netrc \ --env ARCH=$(ARCH) \ --env OS=$(OS) \ --env VERSION=$(VERSION) \ @@ -329,6 +332,7 @@ lint: | $(BUILD_DIRS) -v $$(pwd)/.go/bin/$(OS)_$(ARCH):/go/bin/$(OS)_$(ARCH) \ -v $$(pwd)/.go/cache:/.cache \ -v $$(pwd)/.go/pkg:/go/pkg \ + -v $${HOME}/.netrc:/.netrc \ --env ARCH=$(ARCH) \ --env OS=$(OS) \ --env VERSION=$(VERSION) \