-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(test-build): update check mail (#579)
* ci(test-build): update check mail * chore: update
- Loading branch information
1 parent
c4d4260
commit dca67df
Showing
1 changed file
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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} == '[email protected]' ]];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} == '[email protected]' ]];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 | ||
|