GitHub Action to validate RSS feeds against the SmartNews SmartFormat v2.1 specification.
- uses: blavity/smartformat-validate-action@v1
with:
feed_urls: '["https://example.com/rss.xml", "https://example.com/tech/rss.xml"]'| Input | Required | Default | Description |
|---|---|---|---|
feed_urls |
yes | JSON array of RSS feed URLs to validate | |
min_item_count |
no | 5 |
Minimum number of <item> elements required per feed |
max_age_hours |
no | 48 |
Max hours since <lastBuildDate> before a staleness warning. Set to 0 to disable. |
require_snf_namespace |
no | true |
Require xmlns:snf="http://www.smartnews.be/snf" namespace declaration |
| Output | Description |
|---|---|
result |
pass or fail |
feeds_passed |
Number of feeds that passed all hard checks |
feeds_failed |
Number of feeds that failed one or more hard checks |
Channel level:
<title>,<link>,<description>present
Item level (per item):
<title>,<link>,<guid>,<pubDate>present<content:encoded>present<media:thumbnail>present (required per SmartFormat v2.1 spec)
Feed level:
- Item count ≥
min_item_count snf:namespace declared (whenrequire_snf_namespace: true)
<lastBuildDate>older thanmax_age_hours<snf:logo>absent from channel (recommended for branding)- Item
<description>absent (recommended per spec)
Each run writes a Markdown table to $GITHUB_STEP_SUMMARY with per-feed pass/fail status and a direct link to the SmartNews Validator for each URL.
jobs:
deploy:
runs-on: ubuntu-24.04
steps:
- name: Deploy
run: echo "deploy step here"
rss-smoke-test:
needs: deploy
runs-on: ubuntu-24.04
steps:
- uses: blavity/smartformat-validate-action@v1
with:
feed_urls: '["https://example.com/rss.xml", "https://example.com/tech/rss.xml"]'Pin to a major tag (@v1) for stability. See releases for the changelog.
See CONTRIBUTING.md.
SmartNews and SmartFormat are trademarks or registered trademarks of SmartNews, Inc. Blavity, Inc. is not affiliated with, endorsed by, or sponsored by SmartNews, Inc. All other trademarks are the property of their respective owners.
MIT — see LICENSE.