Merge remote-tracking branch 'origin/main'
This commit is contained in:
37
.github/workflows/main.yml
vendored
37
.github/workflows/main.yml
vendored
@@ -21,23 +21,24 @@ jobs:
|
|||||||
send-email:
|
send-email:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: install email tool
|
- name: 检出代码仓库
|
||||||
run: |
|
uses: actions/checkout@v4
|
||||||
yum install -y
|
|
||||||
yum install -y curl sendmail
|
|
||||||
- name: send email
|
|
||||||
env:
|
|
||||||
SMTP_SERVER: ${{ secrets.SMTP_SERVER }}
|
|
||||||
SMTP_PORT: ${{ secrets.SMTP_PORT }}
|
|
||||||
EMAIL_USER: ${{ secrets.EMAIL_USER }}
|
|
||||||
EMAIL_PASS: ${{ secrets.EMAIL_PASS }}
|
|
||||||
TO_EMAIL: 1627832236@qq.com
|
|
||||||
run: |
|
|
||||||
echo "Subject: 推送仓库成功" > email.txt
|
|
||||||
echo "From: $EMAIL_USER" >> email.txt
|
|
||||||
echo "To: $TO_EMAIL" >> email.txt
|
|
||||||
echo "" >> email.txt
|
|
||||||
echo "有新的内容推送到仓库toutoukan" >> email.txt
|
|
||||||
sendmail -S "$SMTP_SERVER:$SMTP_PORT" -au"$EMAIL_USER" -ap"$EMAIL_PASS" $TO_EMAIL < email.txt
|
|
||||||
|
|
||||||
|
- name: 发送邮件
|
||||||
|
uses: dawidd6/action-send-mail@v3
|
||||||
|
with:
|
||||||
|
server_address: smtp.qq.com
|
||||||
|
server_port: 465
|
||||||
|
username: ${{ secrets.EMAIL_USER }}
|
||||||
|
password: ${{ secrets.EMAIL_PASS }}
|
||||||
|
subject: "推送仓库成功"
|
||||||
|
body: |
|
||||||
|
通知:有新的内容已推送到仓库「toutoukan」的 main 分支!!
|
||||||
|
|
||||||
|
推送时间: ${{ github.run_started_at }}
|
||||||
|
推送作者: ${{ github.actor }}
|
||||||
|
提交信息: ${{ github.event.head_commit.message || '无提交信息' }}
|
||||||
|
to: 1627832236@qq.com
|
||||||
|
from: ${{ secrets.EMAIL_USER }}
|
||||||
|
# 如果使用 SSL
|
||||||
|
secure: true
|
||||||
|
|||||||
Reference in New Issue
Block a user