Remove GitHub app usage now that attest is public
Signed-off-by: Jonny Stoten <jonny.stoten@docker.com>
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -20,24 +20,12 @@ ENV CGO_ENABLED=0
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# --- This block can be removed when github.com/docker/attest is public
|
||||
ENV GOPRIVATE="github.com/docker/attest"
|
||||
RUN --mount=type=secret,id=GITHUB_TOKEN <<EOT
|
||||
set -e
|
||||
GITHUB_TOKEN=${GITHUB_TOKEN:-$(cat /run/secrets/GITHUB_TOKEN)}
|
||||
if [ -n "$GITHUB_TOKEN" ]; then
|
||||
echo "Setting GitHub access token"
|
||||
git config --global "url.https://x-access-token:${GITHUB_TOKEN}@github.com.insteadof" "https://github.com"
|
||||
fi
|
||||
EOT
|
||||
# ---
|
||||
|
||||
ARG VERSION="dev"
|
||||
|
||||
RUN --mount=type=bind,source=.,target=/app \
|
||||
--mount=type=cache,target=$GOPATH/pkg/mod \
|
||||
--mount=type=cache,target=/root/.cache/go-build \
|
||||
go build -ldflags "-X main.version=$VERSION" -o /bin/attest main.go
|
||||
--mount=type=cache,target=$GOPATH/pkg/mod \
|
||||
--mount=type=cache,target=/root/.cache/go-build \
|
||||
go build -ldflags "-X main.version=$VERSION" -o /bin/attest main.go
|
||||
|
||||
FROM ${BASEIMAGE} AS production
|
||||
|
||||
|
||||
Reference in New Issue
Block a user