diff --git a/.circleci/config.yml b/.circleci/config.yml index dac0be7ab22..cf472ab8b37 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -162,10 +162,8 @@ jobs: if [ "${CIRCLE_BRANCH}" != "master" ]; then PR_URL="$CIRCLE_PULL_REQUEST" PR_NUMBER=$(echo $PR_URL | awk -F'/' '{print $NF}') - IS_DRAFT=$(curl "https://api.github.com/repos/scalableminds/webknossos/pulls/${PR_NUMBER}" | jq '.draft') - if [ "$IS_DRAFT" == "true" ]; then - echo "PR is a draft, not installing dev deployment" - else + SHOULD_AUTOMERGE=$(curl "https://api.github.com/repos/scalableminds/webknossos/pulls/${PR_NUMBER}" | jq -e '.labels | .[] | select(.name == "autodeploy")') + if [ "$SHOULD_AUTOMERGE" == "true" ]; then curl -X POST -H "X-Auth-Token: $RELEASE_API_TOKEN" "https://kubernetix.scm.io/hooks/install/webknossos/dev/${CIRCLE_BRANCH}?user=CI+%28nightly%29" echo "\nInstalled to $NORMALIZED_BRANCH.webknossos.xyz" fi