Skip to content

rss-to-mastodon

rss-to-mastodon #17547

# 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}}"