Skip to content

Commit

Permalink
Fix clone not working for private repositories
Browse files Browse the repository at this point in the history
Seems like GITHUB_TOKEN doesn't work like it used to.
Reported in #7.
  • Loading branch information
platisd committed Sep 16, 2021
1 parent 6f05afa commit 020647d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ set -eu
script_dir="$(dirname "$0")"
cd $script_dir

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

0 comments on commit 020647d

Please sign in to comment.