diff --git a/start.sh b/start.sh index 6c77d32..5ec381c 100755 --- a/start.sh +++ b/start.sh @@ -1,6 +1,9 @@ #!/bin/sh -set -eux echo "Push to branch ${INPUT_BRANCH}"; +[ -z "${INPUT_GITHUB_TOKEN}" ] && { + echo 'Missing input "github_token: ${{ secrets.GITHUB_TOKEN }}".'; + exit 1; +}; header=$(echo -n "ad-m:${INPUT_GITHUB_TOKEN}" | base64) git -c http.extraheader="AUTHORIZATION: basic $header" push origin refs/remotes/origin/master:master; \ No newline at end of file