Skip to content

notion-review-helper #1585

notion-review-helper

notion-review-helper #1585

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: notion-review-helper
on:
workflow_dispatch: # manual trigger
schedule:
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events
# Runs every 12 hours
- cron: "0 */12 * * *"
jobs:
buildQueryMail:
runs-on: ubuntu-latest
outputs:
outputs1: $${{ steps.message.outputs.message }}
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
env:
DATABASE_ID: ${{ secrets.DATABASE_ID }}
TOKEN: ${{ secrets.TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- id: message
run: npm start || exit 1
- name: Send mail
uses: dawidd6/action-send-mail@v3.6.1
with:
# Required mail server address:
server_address: smtp.gmail.com
# Required mail server port:
server_port: 465
# Optional (recommended): mail server username:
username: ${{secrets.MAIL_USERNAME}}
# Optional (recommended) mail server password:
password: ${{secrets.MAIL_PASSWORD}}
# Required mail subject:
subject: Notion Review Helper Reminder
# Required recipients' addresses:
to: ${{secrets.MAIL_RECIPIENT}}
# Required sender full name (address can be skipped):
from: Review Helper(bot) # <user@example.com>
# Optional whether this connection use TLS (default is true if server_port is 465)
secure: true
# Optional plain body:
body: "${{ steps.message.outputs.message }}"
# Optional converting Markdown to HTML (set content_type to text/html too):
# convert_markdown: true
# Optional HTML body read from file:
#html_body: file://README.html
# Optional carbon copy recipients:
#cc: kyloren@example.com,leia@example.com
# Optional blind carbon copy recipients:
#bcc: r2d2@example.com,hansolo@example.com
# Optional recipient of the email response:
#reply_to: luke@example.com
# Optional Message ID this message is replying to:
#in_reply_to: <random-luke@example.com>
# Optional unsigned/invalid certificates allowance:
#ignore_cert: true
# Optional attachments:
#attachments: attachments.zip,git.diff,./dist/static/*.js
# Optional priority: 'high', 'normal' (default) or 'low'
#priority: low