mirror of
https://github.com/zhigang1992/actions.git
synced 2026-01-12 17:12:24 +08:00
Lowercase status input & handle cancelled status
This commit is contained in:
@@ -7,13 +7,18 @@
|
||||
# $1 - The deployment state
|
||||
# $2 - The deployment description
|
||||
#
|
||||
set -e
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
DEPLOYMENT_ID=$("${BASEDIR}"/deployment-get-id)
|
||||
|
||||
DEPLOY_STATE="${1}"
|
||||
DEPLOY_STATE=$(echo "${1}"|tr [A-Z] [a-z])
|
||||
DEPLOY_DESC="${2}"
|
||||
|
||||
if [ "$DEPLOY_STATE" == "cancelled" ]; then
|
||||
DEPLOY_STATE="inactive"
|
||||
fi
|
||||
|
||||
[ -n "${DEPLOY_DESC}" ] || DEPLOY_DESC="Deploying from GitHub Actions"
|
||||
|
||||
echo "Setting status to ${DEPLOY_STATE} for deployment-id '${DEPLOYMENT_ID}'"
|
||||
|
||||
Reference in New Issue
Block a user