mirror of
https://github.com/zhigang1992/actions.git
synced 2026-01-12 22:45:39 +08:00
Use correct accept-header
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user