Fixed script
This commit is contained in:
parent
cd238e5415
commit
34f4834977
@ -6,6 +6,6 @@ ADD giteaPR.sh /
|
||||
RUN chmod +x /giteaPR.sh
|
||||
|
||||
ENV GITEA_HOST=git.cluster.fun
|
||||
ENV ACCESS_KEY=
|
||||
ENV ACCESS_TOKEN=
|
||||
|
||||
ENTRYPOINT [ "/giteaPR.sh" ]
|
||||
|
10
giteaPR.sh
Normal file → Executable file
10
giteaPR.sh
Normal file → Executable file
@ -4,8 +4,8 @@ REPO=$1
|
||||
SHA=$2
|
||||
STATE=$3
|
||||
|
||||
CONTEXT=${CONTEXT:-Tekton}
|
||||
DESCRIPTION=${DESCRIPTION:-PR Pipeline}
|
||||
CONTEXT=${CONTEXT:-CI}
|
||||
DESCRIPTION=${DESCRIPTION:-"PR Checks..."}
|
||||
|
||||
echo "Repo: ${REPO}"
|
||||
echo "SHA: ${SHA}"
|
||||
@ -14,8 +14,4 @@ echo "State: ${STATE}"
|
||||
curl -X "POST" \
|
||||
"https://${GITEA_HOST}/api/v1/repos/${REPO}/statuses/${SHA}?access_token=${ACCESS_TOKEN}" \
|
||||
-H 'Content-Type: application/json; charset=utf-8' \
|
||||
-d $'{
|
||||
"state": "'$STATE'",
|
||||
"context": "'$CONTEXT'",
|
||||
"description": "'$DESCRIPTION'"
|
||||
}'
|
||||
-d $'{"state": "'"${STATE}"'","context": "'"${CONTEXT}"'","description": "'"${DESCRIPTION}"'"}'
|
||||
|
Loading…
Reference in New Issue
Block a user