send-mail/.github/workflows/test.yml
2021-04-25 16:36:40 +02:00

58 lines
1.6 KiB
YAML

name: Test action
on:
push:
branches:
- master
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
include:
- subject: Plain body (attachment)
attachments: action.yml
body: |
first line
second line
- subject: HTML body (attachments)
attachments: package.json,package-lock.json
html_body: |
<!DOCTYPE html>
<html>
<body>
<h1>Heading</h1>
<p>Paragraph</p>
</body>
</html>
- subject: Plain body (Markdown)
convert_markdown: true
body: file://README.md
- subject: HTML body (Markdown)
convert_markdown: true
html_body: file://README.md
- subject: Multipart body (Markdown)
convert_markdown: true
body: file://README.md
html_body: file://README.md
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Send mail
uses: ./
with:
server_address: ${{secrets.ADDRESS}}
server_port: 465
username: ${{secrets.USERNAME}}
password: ${{secrets.PASSWORD}}
subject: ${{matrix.subject}}
body: ${{matrix.body}}
html_body: ${{matrix.html_body}}
to: ${{github.event.pusher.email}}
from: github-actions
attachments: ${{matrix.attachments}}
convert_markdown: ${{matrix.convert_markdown}}