From 7ea37bbdc20607de6e0e9fb091a978b3725e5af1 Mon Sep 17 00:00:00 2001 From: Lars Gohr Date: Fri, 23 Sep 2022 10:32:26 +0200 Subject: [PATCH] Add a way to use private repositories on GitHub (#869) --- entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index af2acd4..bc6ad6a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,4 +4,8 @@ # provides all arguments concatenated as a single string. ARGS=("$@") +if [[ ! -z "${GITHUB_AUTHENTICATION_TOKEN}" ]]; then + git config --global --add url."https://x-access-token:${GITHUB_AUTHENTICATION_TOKEN}@github.com/".insteadOf "https://github.com/" +fi + /bin/gosec ${ARGS[*]}