GitHub Actions to post newly added entries from a RSS feed to twitter.
This actions was developed for utelecon project, inspired by azu/rss-to-twitter.
- Load RSS feeds from
NEW_RSS
andOLD_RSS
files. - Compare the feeds, and find the newly added entries.
- Post the newly added entries to Twitter.
To use this GitHub Action, create a workflow YAML file in your repository's .github/workflows
directory. Below is an example configuration:
name: RSS Diff to Twitter
on:
push:
branches: [main]
jobs:
post_to_twitter:
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: rss-old
path: rss-old
- uses: actions/download-artifact@v4
with:
name: rss-new
path: rss-new
- name: Run RSS diff to Twitter action
uses: utelecon/rssdiff-to-twitter@main
with:
OLD_RSS: "rss-old/rss.xml"
NEW_RSS: "rss-new/rss.xml"
TWITTER_APIKEY: ${{ secrets.TWITTER_APIKEY }}
TWITTER_APIKEY_SECRET: ${{ secrets.TWITTER_APIKEY_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
Please make sure to store your Twitter API credentials as secrets in your GitHub repository.
MIT