Skip to content

Commit 6eeb8d9

Browse files
Chris Thachgithub-actions[bot]
andauthored
Remove GITHUB_TOKEN (#81)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 73df5d1 commit 6eeb8d9

File tree

7 files changed

+0
-82
lines changed

7 files changed

+0
-82
lines changed

.github/workflows/lint-test-build-publish.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,6 @@ jobs:
270270
install: true
271271

272272
- name: Build container artifacts
273-
env:
274-
GITHUB_TOKEN: ${{ secrets.SYS_ORCH_GITHUB }}
275273
run: |
276274
mage build:${{ matrix.version }}
277275

auth-service/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@ FROM golang:1.24.2 AS build
66

77
WORKDIR /workspace
88

9-
# Set environment variables to allow fetching from private repositories
10-
ENV GONOSUMDB=*
11-
ENV GOPRIVATE=github.com/open-edge-platform/*
12-
ENV GOPROXY=direct
13-
14-
# Configure git to use the GitHub token
15-
# Use build secret for GITHUB_TOKEN
16-
RUN --mount=type=secret,id=GITHUB_TOKEN,env=GITHUB_TOKEN \
17-
git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
18-
199
# Copy go.mod, go.sum files and download deps
2010
COPY ./go.mod ./go.sum ./
2111
RUN go mod download -x

aws-sm-proxy/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@ FROM golang:1.24.2 AS build
66

77
WORKDIR /workspace
88

9-
# Set environment variables to allow fetching from private repositories
10-
ENV GONOSUMDB=*
11-
ENV GOPRIVATE=github.com/open-edge-platform/*
12-
ENV GOPROXY=direct
13-
14-
# Configure git to use the GitHub token
15-
# Use build secret for GITHUB_TOKEN
16-
RUN --mount=type=secret,id=GITHUB_TOKEN,env=GITHUB_TOKEN \
17-
git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
18-
199
# Copy go.mod, go.sum files and download deps
2010
COPY go.mod go.sum ./
2111
RUN go mod download

keycloak-tenant-controller/images/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@
55
FROM golang:1.24.2 AS builder
66
ARG KTC_GIT_COMMIT
77

8-
# Set environment variables to allow fetching from private repositories
9-
ENV GONOSUMDB=*
10-
ENV GOPRIVATE=github.com/open-edge-platform/*
11-
ENV GOPROXY=direct
12-
13-
# Configure git to use the GitHub token
14-
# Use build secret for GITHUB_TOKEN
15-
RUN --mount=type=secret,id=GITHUB_TOKEN,env=GITHUB_TOKEN \
16-
git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
17-
188
COPY . /usr/src/keycloak-tenant-controller/
199
WORKDIR /usr/src/keycloak-tenant-controller/
2010

mage/dockerbuild.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ import (
1717

1818
// Builds the secrets-config container image.
1919
func secretsConfigBuild() error {
20-
if os.Getenv("GITHUB_TOKEN") == "" {
21-
return fmt.Errorf("GITHUB_TOKEN must be set")
22-
}
23-
2420
appVersion, err := getChartAppVersion("secrets-config")
2521
if err != nil {
2622
return err
@@ -30,7 +26,6 @@ func secretsConfigBuild() error {
3026
"docker",
3127
"build",
3228
"--load",
33-
"--secret", "id=GITHUB_TOKEN,env=GITHUB_TOKEN",
3429
"--build-arg", "HTTPS_PROXY="+os.Getenv("HTTPS_PROXY"),
3530
"--build-arg", "HTTP_PROXY="+os.Getenv("HTTP_PROXY"),
3631
"--build-arg", "NO_PROXY="+os.Getenv("NO_PROXY"),
@@ -45,10 +40,6 @@ func secretsConfigBuild() error {
4540

4641
// Builds the aws-sm-proxy container image.
4742
func awsSmProxyBuild() error {
48-
if os.Getenv("GITHUB_TOKEN") == "" {
49-
return fmt.Errorf("GITHUB_TOKEN must be set")
50-
}
51-
5243
appVersion, err := getChartAppVersion("aws-sm-proxy")
5344
if err != nil {
5445
return err
@@ -58,7 +49,6 @@ func awsSmProxyBuild() error {
5849
"docker",
5950
"build",
6051
"--load",
61-
"--secret", "id=GITHUB_TOKEN,env=GITHUB_TOKEN",
6252
"--build-arg", "HTTPS_PROXY="+os.Getenv("HTTPS_PROXY"),
6353
"--build-arg", "HTTP_PROXY="+os.Getenv("HTTP_PROXY"),
6454
"--build-arg", "NO_PROXY="+os.Getenv("NO_PROXY"),
@@ -72,10 +62,6 @@ func awsSmProxyBuild() error {
7262
}
7363

7464
func tokenFSBuild() error {
75-
if os.Getenv("GITHUB_TOKEN") == "" {
76-
return fmt.Errorf("GITHUB_TOKEN must be set")
77-
}
78-
7965
appVersion, err := getChartAppVersion("token-fs")
8066
if err != nil {
8167
return err
@@ -85,7 +71,6 @@ func tokenFSBuild() error {
8571
"docker",
8672
"build",
8773
"--load",
88-
"--secret", "id=GITHUB_TOKEN,env=GITHUB_TOKEN",
8974
"--build-arg", "HTTPS_PROXY="+os.Getenv("HTTPS_PROXY"),
9075
"--build-arg", "HTTP_PROXY="+os.Getenv("HTTP_PROXY"),
9176
"--build-arg", "NO_PROXY="+os.Getenv("NO_PROXY"),
@@ -99,10 +84,6 @@ func tokenFSBuild() error {
9984
}
10085

10186
func authServiceBuild() error {
102-
if os.Getenv("GITHUB_TOKEN") == "" {
103-
return fmt.Errorf("GITHUB_TOKEN must be set")
104-
}
105-
10687
appVersion, err := getChartAppVersion("auth-service")
10788
if err != nil {
10889
return err
@@ -120,7 +101,6 @@ func authServiceBuild() error {
120101
"docker",
121102
"build",
122103
"--load",
123-
"--secret", "id=GITHUB_TOKEN,env=GITHUB_TOKEN",
124104
"--build-arg", strings.Trim(gitarg, ""),
125105
"--build-arg", "HTTPS_PROXY="+os.Getenv("HTTPS_PROXY"),
126106
"--build-arg", "HTTP_PROXY="+os.Getenv("HTTP_PROXY"),
@@ -235,10 +215,6 @@ func squidProxyBuild() error {
235215

236216
// Builds the Keycloak Tenant Controller container image.
237217
func keycloakTenantControllerBuild() error {
238-
if os.Getenv("GITHUB_TOKEN") == "" {
239-
return fmt.Errorf("GITHUB_TOKEN must be set")
240-
}
241-
242218
appVersion, err := getChartAppVersion("keycloak-tenant-controller")
243219
if err != nil {
244220
return err
@@ -255,7 +231,6 @@ func keycloakTenantControllerBuild() error {
255231
"docker",
256232
"build",
257233
"--load",
258-
"--secret", "id=GITHUB_TOKEN,env=GITHUB_TOKEN",
259234
"--build-arg", strings.Trim(gitarg, ""),
260235
"--build-arg", "HTTPS_PROXY="+os.Getenv("HTTPS_PROXY"),
261236
"--build-arg", "HTTP_PROXY="+os.Getenv("HTTP_PROXY"),
@@ -409,10 +384,6 @@ func nexusAPIGatewayBuild() error {
409384

410385
// Builds the openapi-generator container image.
411386
func openAPIGeneratorBuild() error {
412-
if os.Getenv("GITHUB_TOKEN") == "" {
413-
return fmt.Errorf("GITHUB_TOKEN must be set")
414-
}
415-
416387
TAG := getNexusCompilerTag()
417388

418389
g0 := sh.OutCmd("git")
@@ -426,7 +397,6 @@ func openAPIGeneratorBuild() error {
426397
"docker",
427398
"build",
428399
"--load",
429-
"--secret", "id=GITHUB_TOKEN,env=GITHUB_TOKEN",
430400
"--build-arg", strings.Trim(gitarg, ""),
431401
"--build-arg", "HTTPS_PROXY="+os.Getenv("HTTPS_PROXY"),
432402
"--build-arg", "HTTP_PROXY="+os.Getenv("HTTP_PROXY"),

secrets/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@ FROM golang:1.24.2 AS build
66

77
WORKDIR /workspace
88

9-
# Set environment variables to allow fetching from private repositories
10-
ENV GONOSUMDB=*
11-
ENV GOPRIVATE=github.com/open-edge-platform/*
12-
ENV GOPROXY=direct
13-
14-
# Configure git to use the GitHub token
15-
# Use build secret for GITHUB_TOKEN
16-
RUN --mount=type=secret,id=GITHUB_TOKEN,env=GITHUB_TOKEN \
17-
git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
18-
199
# Copy go.mod, go.sum files and download deps
2010
COPY go.mod go.sum ./
2111
RUN go mod download

token-fs/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@ FROM golang:1.24.2 AS build
66

77
WORKDIR /workspace
88

9-
# Set environment variables to allow fetching from private repositories
10-
ENV GONOSUMDB=*
11-
ENV GOPRIVATE=github.com/open-edge-platform/*
12-
ENV GOPROXY=direct
13-
14-
# Configure git to use the GitHub token
15-
# Use build secret for GITHUB_TOKEN
16-
RUN --mount=type=secret,id=GITHUB_TOKEN,env=GITHUB_TOKEN \
17-
git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
18-
199
# Copy go.mod, go.sum files and download deps
2010
COPY go.mod go.sum ./
2111
RUN go mod download

0 commit comments

Comments
 (0)