mirror of
https://github.com/maxkratz/community-tutorials.git
synced 2024-09-08 00:02:56 +00:00
36 lines
1.1 KiB
YAML
Executable file
36 lines
1.1 KiB
YAML
Executable file
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
|