Skip to content

Commit

Permalink
Update comment-to-trigger-teamcity.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-stephen authored Jul 31, 2024
1 parent b87a2b0 commit 1ab290b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/comment-to-trigger-teamcity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,21 @@ jobs:
"${COMMENT_BODY}" == *'run arm'* ||
"${COMMENT_BODY}" == *'run performance'* ]]; then
echo "comment_trigger=true" | tee -a "$GITHUB_OUTPUT"
elif [[ "${COMMENT_BODY}" == *'skip buildall'* ]]; then
else
echo "comment_trigger=false" | tee -a "$GITHUB_OUTPUT"
echo "find no keyword in comment body, skip this action."
exit
fi
if [[ "${COMMENT_BODY}" == *'skip buildall'* ]]; then
if [[ "${COMMENT_USER_ID}" == '27881198' ||
"${COMMENT_USER_ID}" == '37901441' ]]; then
echo "comment_skip=true" | tee -a "$GITHUB_OUTPUT"
else
echo "COMMENT_USER_ID ${COMMENT_USER_ID} is not allowed to skip buildall."
echo "comment_skip=false" | tee -a "$GITHUB_OUTPUT"
exit
fi
else
echo "comment_trigger=false" | tee -a "$GITHUB_OUTPUT"
echo "find no keyword in comment body, skip this action."
exit
fi
PULL_REQUEST_NUM="$(echo "${{ github.event.issue.pull_request.url }}" | awk -F/ '{print $NF}')"
Expand Down

0 comments on commit 1ab290b

Please sign in to comment.