Skip to content

Bluesky FeedBot

Bluesky FeedBot #106

name: Bluesky FeedBot
on:
schedule:
# This will run every hour
- cron: "0 * * * *"
workflow_dispatch:
jobs:
rss-to-bluesky:
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@v4
with:
path: ${{ github.workspace }}/blueskyfeedbot
key: feed-cache-${{ steps.generate-key.outputs.cache-key }}
restore-keys: feed-cache-
- name: GitHub
uses: "joschi/[email protected]"
with:
# This is the RSS feed you want to publish
rss-feed: https://nf-co.re/blog/rss.xml
# Template of status posted to Bluesky (Handlebars)
template: |
New blog post! {{item.title}}
{{item.link}}
# This is your service URL (optional)
service-url: https://bsky.social
# This is the Bluesky username (example: username.bsky.social)
username: "nf-co.re"
# This is the app password you created earlier
password: ${{ secrets.FEED_TO_BLUESKY }}
# This is a path to the cache file, using the above cache path
cache-file: ${{ github.workspace }}/blueskyfeedbot/cache.json
initial-post-limit: 0