send-mail/.github/workflows/test.yml

77 lines
2.1 KiB
YAML
Raw Normal View History

2019-11-18 19:23:22 +07:00
name: Test action
on:
push:
branches:
- master
2021-07-13 23:24:00 +07:00
paths-ignore:
- README.md
workflow_dispatch:
2019-11-18 19:23:22 +07:00
jobs:
main:
runs-on: ubuntu-latest
2019-12-06 16:26:00 +07:00
strategy:
2020-03-24 20:09:19 +07:00
max-parallel: 1
2019-12-06 16:26:00 +07:00
matrix:
include:
2021-04-25 21:20:37 +07:00
- subject: Plain body (attachment)
attachments: action.yml
2021-04-25 21:20:37 +07:00
body: |
first line
second line
- subject: HTML body (attachments)
attachments: package.json,package-lock.json
2021-04-25 21:23:58 +07:00
html_body: |
<!DOCTYPE html>
<html>
<body>
<h1>Heading</h1>
<p>Paragraph</p>
</body>
</html>
- subject: file://testdata/subject.txt
convert_markdown: true
2021-04-25 21:20:37 +07:00
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
2019-11-18 19:23:22 +07:00
steps:
2020-03-25 21:58:47 +07:00
- name: Checkout code
uses: actions/checkout@v4
2019-11-18 19:23:22 +07:00
- name: Send mail
uses: ./
with:
server_address: ${{secrets.ADDRESS}}
server_port: 465
username: ${{secrets.USERNAME}}
password: ${{secrets.PASSWORD}}
2021-04-25 21:20:37 +07:00
subject: ${{matrix.subject}}
2019-12-06 16:26:00 +07:00
body: ${{matrix.body}}
2021-04-25 21:36:40 +07:00
html_body: ${{matrix.html_body}}
2020-03-25 21:50:42 +07:00
to: ${{github.event.pusher.email}}
from: github-actions
attachments: ${{matrix.attachments}}
2021-04-25 21:20:37 +07:00
convert_markdown: ${{matrix.convert_markdown}}
priority: high
url-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Send mail
uses: ./
with:
connection_url: smtp+starttls://${{secrets.USERNAME}}:${{secrets.PASSWORD}}@${{secrets.ADDRESS}}/
subject: Plain body with connection_url
body: |
first line
second line
to: ${{github.event.pusher.email}}
from: github-actions