Skip to content

Commit

Permalink
update mount secret
Browse files Browse the repository at this point in the history
  • Loading branch information
maiquanghiep committed Aug 27, 2024
1 parent 4239a95 commit d83e17b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ RUN apk add --no-cache --update openssh git make build-base linux-headers libc-d
libzmq-static libsodium-static gcc


RUN --mount=type=secret,id=GO_PRIVATE_TOKEN \ <<EOT
set -e
git config --global url."https://${{ secrets.GO_PRIVATE_TOKEN }}@github.com/".insteadOf "https://github.com/"
# Ensure secrets are accessible
RUN --mount=type=secret,id=GO_PRIVATE_TOKEN \
sh -c 'set -e && \
TOKEN=$(cat /run/secrets/GO_PRIVATE_TOKEN) && \
git config --global url."https://${TOKEN}@github.com/".insteadOf "https://github.com/"'


# Build
WORKDIR /go/src/github.com/babylonlabs-io/finality-provider
Expand Down

0 comments on commit d83e17b

Please sign in to comment.