Skip to content

Commit 020647d

Browse files
committed
Fix clone not working for private repositories
Seems like GITHUB_TOKEN doesn't work like it used to. Reported in #7.
1 parent 6f05afa commit 020647d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ set -eu
44
script_dir="$(dirname "$0")"
55
cd $script_dir
66

7-
eval git clone "https://${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" ${GITHUB_REPOSITORY}
7+
maintainer=${GITHUB_REPOSITORY%/*}
8+
eval git clone "https://${maintainer}:${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" ${GITHUB_REPOSITORY}
89
cd $GITHUB_REPOSITORY
910
eval git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
1011
eval git fetch --all

0 commit comments

Comments
 (0)