Skip to content

πŸ“₯ Download RSS Feeds #789

πŸ“₯ Download RSS Feeds

πŸ“₯ Download RSS Feeds #789

# A GitHub Action to download RSS feeds from various sources
# Runs each night, used to populate my website's activity feed
name: πŸ“₯ Download RSS Feeds
on:
workflow_dispatch: # Manual dispatch
schedule:
- cron: '0 23 * * *' # At 23:00 each day
jobs:
download:
runs-on: ubuntu-latest
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/[email protected]
- name: Get Date πŸ“…
id: date
run: echo "::set-output name=date::$(date +'%d-%b-%Y')"
- name: Download Feeds πŸ“¬
run: |
fetch_feed() { curl "${1}" --fail --connect-timeout 10 --max-time 15 --retry 3 --retry-delay 10 --retry-max-time 90 -o "${2}"; }
fetch_feed "https://notes.aliciasykes.com/feed" "./blog.atom"
fetch_feed "https://dev.to/feed/lissy93" "./dev-to.atom"
fetch_feed "https://lissy93.blogspot.com/feeds/posts/default" "./blogger.atom"
fetch_feed "https://github.com/lissy93.atom" "./github.atom"
# fetch_feed "https://nitter.net/lissy_sykes/rss" "./twitter.atom"
# fetch_feed "https://nitter.fdn.fr/Lissy_Sykes/rss" "./twitter.atom"
fetch_feed "https://stackoverflow.com/feeds/user/979052" "./stackoverflow.atom"
fetch_feed "https://reddit.com/user/lissy93/submitted.rss" "./reddit.atom"
fetch_feed "https://mastodon.social/users/lissy93.rss" "./mastodon.atom"
fetch_feed "https://www.youtube.com/feeds/videos.xml?channel_id=UCY_XiFwLImCn3arzomg8eRA" "./youtube.atom"
- name: Commit βœ’οΈ
run: |
git config --local user.email "[email protected]"
git config --local user.name "liss-bot"
git add .
git commit -m "πŸ—žοΈ Downloads RSS Feed - Updated on ${{ steps.date.outputs.date }}"
- name: Push ‴️
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.BOT_GITHUB_TOKEN || github.token }}
branch: ${{ github.ref }}