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