Skip to content

Commit f096b3d

Browse files
committed
configure git credentials and environment for platform-mesh access
On-behalf-of: @SAP [email protected] Signed-off-by: Angel Kafazov <[email protected]>
1 parent cb22c86 commit f096b3d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ FROM golang:1.24 AS builder
22

33
ENV GOSUMDB=off
44

5+
RUN git config --global credential.helper store
6+
RUN --mount=type=secret,id=org_token echo "https://gha:$(cat /run/secrets/org_token)@github.com" > /root/.git-credentials
7+
58
WORKDIR /app
69

710
COPY go.mod go.mod

Taskfile.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,14 @@ tasks:
4141
lint:
4242
deps: [setup:golangci-lint]
4343
cmds:
44+
- echo "https://openmfp:[email protected]" >> $HOME/.git-credentials
45+
- git config --global url."https://${PLATFORM_MESH_TOKEN}@github.com/".insteadOf "https://github.com/"
4446
- task: fmt
4547
- "{{.LOCAL_BIN}}/golangci-lint run --timeout 15m ./..."
48+
env:
49+
GOPRIVATE: github.com/platform-mesh
50+
GO111MODULE: on
51+
PLATFORM_MESH_TOKEN: ${PLATFORM_MESH_TOKEN}
4652
test:
4753
env:
4854
GOPRIVATE: github.com/platform-mesh

0 commit comments

Comments
 (0)