-
Notifications
You must be signed in to change notification settings - Fork 81
executable file
·36 lines (33 loc) · 1.11 KB
/
send_mail.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Send mail on PR
on:
pull_request_target:
types: [opened]
jobs:
send_mail:
runs-on: ubuntu-latest
steps:
- name: Create mail body 📝
run: |
MY_STRING=$(cat << EOF
New Pull Request to Review on ${{ github.repository }}
https://github.com/${{ github.repository }}/pull/${{github.event.number}}
EOF
)
MY_STRING="${MY_STRING//'%'/'%25'}"
MY_STRING="${MY_STRING//$'\n'/'%0A'}"
MY_STRING="${MY_STRING//$'\r'/'%0D'}"
echo "::set-output name=content::$MY_STRING"
id: mail_body
- name: Send mail 📧
uses: dawidd6/action-send-mail@v3
with:
server_address: ${{ secrets.MAIL_HOST }}
server_port: ${{ secrets.MAIL_PORT }}
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: ${{ github.event.pull_request.title }}
to: ${{ secrets.MAIL_TO_ADDRESS }}
from: netcup Community
secure: false
body: ${{ steps.mail_body.outputs.content }}
ignore_cert: true