Use correct accept-header

This commit is contained in:
Ole Christian Lanfjæran
2019-09-05 14:47:12 +02:00
parent 2af1cee25c
commit 2ee3ecbfe8

View File

@@ -17,8 +17,14 @@ DEPLOY_DESC="${2}"
if [ "$DEPLOY_STATE" == "cancelled" ]; then
DEPLOY_STATE="inactive"
ACCEPT_HEADER="application/vnd.github.ant-man-preview+json"
else
ACCEPT_HEADER="application/vnd.github.flash-preview+json"
fi
ACCEPT_HEADER="application/vnd.github.flash-preview+json"
[ -n "${DEPLOY_DESC}" ] || DEPLOY_DESC="Deploying from GitHub Actions"
echo "Setting status to ${DEPLOY_STATE} for deployment-id '${DEPLOYMENT_ID}'"
@@ -26,5 +32,5 @@ wget -O-- \
--post-data "{\"state\":\"${DEPLOY_STATE}\", \"target_url\":\"https://github.com/${GITHUB_REPOSITORY}/actions\", \"description\":\"${DEPLOY_DESC}\"}" \
--header "Authorization: token ${GITHUB_TOKEN}" \
--header "Content-Type: text/json; charset=utf-8" \
--header "Accept: application/vnd.github.flash-preview+json" \
--header "Accept: ${ACCEPT_HEADER}" \
https://api.github.com/repos/"${GITHUB_REPOSITORY}"/deployments/"${DEPLOYMENT_ID}"/statuses