-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (41 loc) · 1.21 KB
/
update.yml
File metadata and controls
41 lines (41 loc) · 1.21 KB
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
37
38
39
40
41
name: My Mastodon Email Digest
on:
schedule:
- cron: '0 10 * * *'
workflow_dispatch:
jobs:
update:
name: digest
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
with:
ref: main
- name: python setup
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: python things
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: run digest
if:
env:
MASTODON_TOKEN: ${{ secrets.MASTODON_TOKEN }}
MASTODON_BASE_URL: ${{ secrets.MASTODON_BASE_URL }}
MASTODON_USERNAME: ${{ secrets.MASTODON_USERNAME }}
run: |
python run.py -n 12 -s SimpleWeighted -t lax
- name: email
uses: dawidd6/action-send-mail@v3
with:
server_address: ${{secrets.MAIL_SERVER}}
server_port: ${{secrets.MAIL_SERVER_PORT}}
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: Mastodon Email Digest
to: ${{secrets.MAIL_DESTINATION}}
from: Mastodon Digest Bot
html_body: file://render/index.html