-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
clone-key
option for private repos (#250)
- Loading branch information
Showing
6 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,17 @@ RUN if [ "${TARGETARCH}" = "arm64" ] && [ "${BUILDARCH}" != "arm64" ]; then\ | |
wget -c https://musl.cc/x86_64-linux-musl-cross.tgz -O - | tar -xzvv --strip-components 1 -C /usr;\ | ||
fi | ||
|
||
ARG CLONE_KEY | ||
|
||
RUN if [ ! -z "CLONE_KEY" ]; then\ | ||
mkdir -p ~/.ssh;\ | ||
echo "${CLONE_KEY}" | base64 -d > ~/.ssh/id_ed25519;\ | ||
chmod 600 ~/.ssh/id_ed25519;\ | ||
apk add openssh;\ | ||
git config --global --add url."ssh://[email protected]/".insteadOf "https://github.com/";\ | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts;\ | ||
fi | ||
|
||
ARG GITHUB_ORGANIZATION | ||
ARG REPO_HOST | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,17 @@ FROM golang:${BASE_VERSION} AS build-env | |
|
||
RUN apk add --update --no-cache curl make git libc-dev bash gcc linux-headers eudev-dev ncurses-dev | ||
|
||
ARG CLONE_KEY | ||
|
||
RUN if [ ! -z "CLONE_KEY" ]; then\ | ||
mkdir -p ~/.ssh;\ | ||
echo "${CLONE_KEY}" | base64 -d > ~/.ssh/id_ed25519;\ | ||
chmod 600 ~/.ssh/id_ed25519;\ | ||
apk add openssh;\ | ||
git config --global --add url."ssh://[email protected]/".insteadOf "https://github.com/";\ | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts;\ | ||
fi | ||
|
||
ARG TARGETARCH | ||
ARG BUILDARCH | ||
ARG GITHUB_ORGANIZATION | ||
|