Skip to content

Commit

Permalink
Check if automerge label is set
Browse files Browse the repository at this point in the history
  • Loading branch information
frcroth committed Mar 18, 2024
1 parent 3ef88ac commit 04f5600
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04f5600

Please sign in to comment.