updates
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
: "${INPUT_GIT_BASE_URL:?missing INPUT_GIT_BASE_URL}"
|
||||
: "${INPUT_GIT_SERVER_URL:?missing INPUT_GIT_SERVER_URL}"
|
||||
: "${INPUT_GIT_REPOSITORY:?missing INPUT_GIT_REPOSITORY}"
|
||||
: "${INPUT_GIT_SHA:?missing INPUT_GIT_SHA}"
|
||||
: "${INPUT_GIT_USER:?missing INPUT_GIT_USER}"
|
||||
@@ -17,7 +17,7 @@ set -euo pipefail
|
||||
case "${INPUT_IMAGE_NAME}" in
|
||||
*/*) ;;
|
||||
*)
|
||||
echo "INPUT_IMAGE_NAME must include owner/name, for example: example/signup_app" >&2
|
||||
echo "INPUT_IMAGE_NAME must include owner/name, for example: example/testapp" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -38,7 +38,8 @@ mkdir -p "${workdir}"
|
||||
|
||||
git init "${workdir}"
|
||||
cd "${workdir}"
|
||||
git remote add origin "https://${INPUT_GIT_USER}:${INPUT_GIT_TOKEN}@${INPUT_GIT_BASE_URL}/${INPUT_GIT_REPOSITORY}.git"
|
||||
git remote add origin "${INPUT_GIT_SERVER_URL}/${INPUT_GIT_REPOSITORY}.git"
|
||||
git config http.extraHeader "Authorization: Basic $(printf '%s:%s' "${INPUT_GIT_USER}" "${INPUT_GIT_TOKEN}" | base64 -w0)"
|
||||
git fetch --depth=1 origin "${INPUT_GIT_SHA}"
|
||||
git checkout --detach FETCH_HEAD
|
||||
|
||||
|
||||
Reference in New Issue
Block a user