diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index ae02570e..a4d42f6f 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -10,13 +10,33 @@ jobs: - uses: actions/checkout@v4 - name: check_github_primary_email run: | - log_emails=$(git log --pretty=format:"%ae %ce" -1) && if [[ ${log_emails} =~ '@tencent.com' ]];then echo "默认邮箱 $log_emails 校验非法,可以去 https://github.com/settings/emails 更改" && exit 2;else echo "邮箱 $log_emails 校验通过";fi + log_emails=$(git log --pretty=format:"%ae %ce" -1) + if [[ ${log_emails} == 'tdesign-bot@tencent.com' ]];then + echo "$log_emails 跳过验证" + exit 0 + fi + if [[ ${log_emails} =~ '@tencent.com' ]];then + echo "默认邮箱 $log_emails 校验非法,可以去 https://github.com/settings/emails 更改" + exit 2; + else + echo "邮箱 $log_emails 校验通过"; + fi - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: check_local_email run: | - log_emails=$(git log --pretty=format:"%ae %ce" -1) && if [[ ${log_emails} =~ '@tencent.com' ]];then echo "本地提交邮箱 $log_emails 校验非法,需要本地更改重新提交" && exit 2;else echo "邮箱 $log_emails 校验通过";fi + log_emails=$(git log --pretty=format:"%ae %ce" -1) + if [[ ${log_emails} == 'tdesign-bot@tencent.com' ]];then + echo "$log_emails 跳过验证" + exit 0 + fi + if [[ ${log_emails} =~ '@tencent.com' ]];then + echo "本地提交邮箱 $log_emails 校验非法,需要本地更改重新提交" + exit 2; + else + echo "邮箱 $log_emails 校验通过"; + fi test: # needs: check