This is an automated email from the ASF dual-hosted git repository.
hellostephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 5db2af10b76 [ci](trigger) user 9208457 can skip buildall on branch-2.1
(#40419)
5db2af10b76 is described below
commit 5db2af10b764719bc3738cec60fc2a492ab8e017
Author: Dongyang Li <[email protected]>
AuthorDate: Fri Sep 6 19:38:42 2024 +0800
[ci](trigger) user 9208457 can skip buildall on branch-2.1 (#40419)
## Proposed changes
Issue Number: close #xxx
<!--Describe your changes.-->
Co-authored-by: stephen <[email protected]>
---
.github/workflows/comment-to-trigger-teamcity.yml | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/comment-to-trigger-teamcity.yml
b/.github/workflows/comment-to-trigger-teamcity.yml
index f56077424b6..e99dd1b4d29 100644
--- a/.github/workflows/comment-to-trigger-teamcity.yml
+++ b/.github/workflows/comment-to-trigger-teamcity.yml
@@ -43,6 +43,9 @@ jobs:
id: parse
run: |
COMMENT_BODY=$(echo "${COMMENT_BODY}" | xargs)
+ PULL_REQUEST_NUM="$(echo "${{ github.event.issue.pull_request.url }}"
| awk -F/ '{print $NF}')"
+ COMMIT_ID_FROM_TRIGGER="$(curl -s -H "Authorization:Bearer ${{
secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository
}}/pulls/${PULL_REQUEST_NUM}" | jq -r '.head.sha')"
+ TARGET_BRANCH="$(curl -s -H "Authorization:Bearer ${{
secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository
}}/pulls/${PULL_REQUEST_NUM}" | jq -r '.base.ref')"
if [[ "${COMMENT_BODY}" == *'run buildall'* ||
"${COMMENT_BODY}" == *'run compile'* ||
"${COMMENT_BODY}" == *'run beut'* ||
@@ -63,6 +66,10 @@ jobs:
echo "comment_trigger=false" | tee -a "$GITHUB_OUTPUT"
echo "comment_skip=true" | tee -a "$GITHUB_OUTPUT"
echo "COMMENT_USER_ID ${COMMENT_USER_ID} is allowed to skip
buildall."
+ elif [[ "${COMMENT_USER_ID}" == '9208457' && "${TARGET_BRANCH}" ==
*'branch-2.1'* ]]; then
+ echo "COMMENT_USER_ID ${COMMENT_USER_ID} is allowed to skip
buildall for branch-2.1"
+ echo "comment_trigger=false" | tee -a "$GITHUB_OUTPUT"
+ echo "comment_skip=true" | tee -a "$GITHUB_OUTPUT"
else
echo "COMMENT_USER_ID ${COMMENT_USER_ID} is not allowed to
skip buildall."
exit
@@ -74,9 +81,6 @@ jobs:
exit
fi
- PULL_REQUEST_NUM="$(echo "${{ github.event.issue.pull_request.url }}"
| awk -F/ '{print $NF}')"
- COMMIT_ID_FROM_TRIGGER="$(curl -s -H "Authorization:Bearer ${{
secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository
}}/pulls/${PULL_REQUEST_NUM}" | jq -r '.head.sha')"
- TARGET_BRANCH="$(curl -s -H "Authorization:Bearer ${{
secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository
}}/pulls/${PULL_REQUEST_NUM}" | jq -r '.base.ref')"
echo "PULL_REQUEST_NUM=${PULL_REQUEST_NUM}" | tee -a "$GITHUB_OUTPUT"
echo "COMMIT_ID_FROM_TRIGGER=${COMMIT_ID_FROM_TRIGGER}" | tee -a
"$GITHUB_OUTPUT"
echo "TARGET_BRANCH='${TARGET_BRANCH}'" | tee -a "$GITHUB_OUTPUT"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]