-
-
Notifications
You must be signed in to change notification settings - Fork 71
58 lines (53 loc) · 1.85 KB
/
rss-to-mastodon.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Source: https://github.com/jser/mastofeedbot
name: rss-to-mastodon
on:
schedule:
- cron: '*/15 * * * *'
workflow_dispatch:
jobs:
realtime:
runs-on: ubuntu-latest
steps:
- name: Generate cache key
uses: actions/github-script@v6
id: generate-key
with:
script: |
core.setOutput('cache-key', new Date().valueOf())
- name: Retrieve cache
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/mastofeedbot
key: feed-cache-realtime-jser-info-${{ steps.generate-key.outputs.cache-key }}
restore-keys: feed-cache-realtime-jser-info-
- name: JSer.info
uses: 'jser/mastofeedbot@main'
with:
rss-feed: https://realtime.jser.info/feed.xml
api-endpoint: https://mstdn.jp
api-token: ${{ secrets.JSER_MASTODON_TOKEN }}
cache-file: ${{ github.workspace }}/mastofeedbot/cache.json
status-template: "{{title}}\n{{link}}\n\n{{description}}"
jser:
runs-on: ubuntu-latest
steps:
- name: Generate cache key
uses: actions/github-script@v6
id: generate-key
with:
script: |
core.setOutput('cache-key', new Date().valueOf())
- name: Retrieve cache
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/mastofeedbot
key: feed-cache-jser-info-${{ steps.generate-key.outputs.cache-key }}
restore-keys: feed-cache-jser-info-
- name: JSer.info
uses: 'jser/mastofeedbot@main'
with:
rss-feed: https://jser.info/rss/
api-endpoint: https://mstdn.jp
api-token: ${{ secrets.JSER_MASTODON_TOKEN }}
cache-file: ${{ github.workspace }}/mastofeedbot/cache.json
status-template: "今週のJSer.infoを更新しました!\n{{title}}\n{{link}}"