Skip to content

nahuelhds/rss-entries-fetch-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

RSS Entries Fetch Action

GitHub Super-Linter CI Check dist/ CodeQL Coverage

Introduction

The RSS Entries Fetch Action is a GitHub Action created to make easier taking articles from any RSS feed.

Strongly inspired on RSS Fetch Action which fetches the feeds but not the articles inside them.

This GitHub Action is a wrapper around the extract function from both @extractus/feed-extractor and @extractus/article-extractor libraries.

Both extract methods here are called with their defaults. Any addition or change is welcome, send your own PR and let's merge it ;)

Features

  • Fetches RSS, Atom, RDF, and JSON feeds and their articles.
  • Saves the fetched articles inside the specified destination folder.

Usage

Here's a basic example to add to your GitHub Actions workflow YAML file:

name: Fetch RSS Articles

on:
  push:
    branches:
      - main

jobs:
  fetch-rss:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Fetch RSS Articles
        uses: nahuelhds/rss-fetch-action@v0
        with:
          feed_urls: https://rss.nytimes.com/services/xml/rss/nyt/World.xml
          destination_folder: ./test

      - name: Commit and push changes to repository
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: "Update RSS articles"

In this workflow, we fetch the New York Times RSS feed and save all the articles on the ./test folder. We then commit and push the changes to the repository.

nahuelhds