Skip to content

Commit

Permalink
fix(bug); update hardcoded repo path
Browse files Browse the repository at this point in the history
  • Loading branch information
vinay0410 authored Nov 29, 2019
1 parent 5b061e8 commit 7816b0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ echo '{
"email": "[email protected]"
},
"content": "'"$(base64 -w 0 $OUTPUT_PDF)"'",
"sha": '$(curl -X GET https://api.github.com/repos/vinay0410/webpage/contents/$OUTPUT_PDF | jq .sha)'
"sha": '$(curl -X GET -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/${GITHUB_REPOSITORY}/contents/$OUTPUT_PDF | jq .sha)'
}' >> payload.json

STATUSCODE=$(curl --silent --output /dev/stderr --write-out "%{http_code}" \
-i -X PUT -H "Authorization: token $GITHUB_TOKEN" -d @payload.json \
https://api.github.com/repos/vinay0410/webpage/contents/$OUTPUT_PDF)
https://api.github.com/repos/${GITHUB_REPOSITORY}/contents/$OUTPUT_PDF)

if [ $((STATUSCODE/100)) -ne 2 ]; then
echo "Github's API returned $STATUSCODE"
Expand Down

0 comments on commit 7816b0e

Please sign in to comment.