All Projects → sarisia → actions-readme-feed

sarisia / actions-readme-feed

Licence: MIT License
Display RSS feed in your GitHub Profile README

Programming Languages

typescript
32286 projects
Dockerfile
14818 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to actions-readme-feed

awesome-rss-feeds
Awesome RSS feeds - A curated list of RSS feeds (and OPML files) used in Recommended Feeds and local news sections of Plenary - an RSS reader, article downloader and a podcast player app for android
Stars: ✭ 114 (+338.46%)
Mutual labels:  rss, feed
want-my-rss
RSS features for Firefox
Stars: ✭ 68 (+161.54%)
Mutual labels:  rss, feed
overflow-news
📚 Don't waste time searching for good dev blog posts. Get the latest news here.
Stars: ✭ 32 (+23.08%)
Mutual labels:  rss, feed
watch-rss
Subscribe your watched GitHub Repository's releases as RSS feeds on Inoreader
Stars: ✭ 24 (-7.69%)
Mutual labels:  rss, feed
microblog
A very simple PHP app that stores twitter-like status updates in a sqlite database.
Stars: ✭ 30 (+15.38%)
Mutual labels:  rss, feed
DenverCoder1
Jonah Lawrence's Profile README
Stars: ✭ 320 (+1130.77%)
Mutual labels:  readme, github-actions
prathimacode-hub
Hello everyone, Welcome to my GitHub README profile. Glad to see you here! Check out this repository to view my work and learn more about me. Don't just star it, fork it as well.📢✌️
Stars: ✭ 53 (+103.85%)
Mutual labels:  readme, github-actions
feed2email
RSS/Atom feed updates in your email
Stars: ✭ 37 (+42.31%)
Mutual labels:  rss, feed
html2rss-web
🕸 Generates and delivers RSS feeds via HTTP. Create your own feeds or get started quickly with the included configs.
Stars: ✭ 36 (+38.46%)
Mutual labels:  rss, feed
Feedly-Export-Save4Later
Working script for latest feedly design. Including title, url, summary, time, sourceTitle & sourceUrl
Stars: ✭ 23 (-11.54%)
Mutual labels:  rss, feed
zhiiiyang
It is a self-updating personal README showing my latest tweet and reply.
Stars: ✭ 27 (+3.85%)
Mutual labels:  readme, github-actions
feeds-to-pocket
Sends entries from RSS and Atom feeds to Pocket (https://getpocket.com)
Stars: ✭ 24 (-7.69%)
Mutual labels:  rss, feed
awesome-feeds
A curated list of tech, machine learning, biz and etc... feeds
Stars: ✭ 25 (-3.85%)
Mutual labels:  rss, feed
meta-extractor
Super simple and fast html page meta data extractor with low memory footprint
Stars: ✭ 38 (+46.15%)
Mutual labels:  rss, feed
vuepress-plugin-feed
RSS, Atom, and JSON feeds generator plugin for VuePress 1.x
Stars: ✭ 46 (+76.92%)
Mutual labels:  rss, feed
feedsearch-crawler
Crawl sites for RSS, Atom, and JSON feeds.
Stars: ✭ 23 (-11.54%)
Mutual labels:  rss, feed
podcast-feed-parser
A highly customizable package for fetching and parsing podcast feeds into simple and manageable JavaScript objects. For use with node or in the browser.
Stars: ✭ 39 (+50%)
Mutual labels:  rss, feed
f43.me
A more readable & cleaner feed
Stars: ✭ 60 (+130.77%)
Mutual labels:  rss, feed
baRSS
Menu Bar RSS reader for macOS
Stars: ✭ 39 (+50%)
Mutual labels:  rss, feed
YouTubeFeeds
Get new youtube video notifs, on telegram!
Stars: ✭ 29 (+11.54%)
Mutual labels:  rss, feed

Actions Readme Feed

Display and auto-update RSS feed in your GitHub Profile README

image

⚠️ If you're reading this document in Marketplace page, please refer to the latest document here.

Usage

First, add flag comments to where you want in your document:

### Latest Posts
<!-- feed start -->
<!-- feed end -->

Then add following steps to your workflow:

steps:
  - uses: actions/checkout@v2
  - uses: sarisia/actions-readme-feed@v1
    with:
      url: 'https://note.sarisia.cc/index.xml'
      file: 'README.md'
  - uses: sarisia/actions-commit@master
Or commit manually...
steps:
  - uses: actions/checkout@v2
  - uses: sarisia/actions-readme-feed@v1
    with:
      url: 'https://note.sarisia.cc/index.xml'
      file: 'README.md'
  - run: |
      git config --global user.name "${{ github.actor }}"
      git config --global user.email "${{ github.actor }}@users.noreply.github.com"
      git add .
      git commit -m "docs: update feed" || true
      git push

The result looks like:

Latest Posts

Inputs

Key Required Value Default Description
url Yes String URL of RSS feed (XML)
file Yes String Path to document file to process.
Can be relative path from repository root, or absolute path of Actions Runner.
sort Boolean true Sort feed entries by date in decending order.
max_entry Number 5 Number of feed entries to show
format String - ${monthshort} ${02day} - [${title}](${url}) Feed entry format string.
See Formatting for details.
start_flag String <!-- feed start --> Flag string to declare start of feed block
end_flag String <!-- feed end --> Flag string to declare end of feed block
locale String en-US Locale used to format date
NEEDS ADDITIONAL CONFIGURATION. See remarks
timezone String UTC Timezone (e.g. Asia/Tokyo) used to format date
nowrite Boolean false Do not write results to the file specified as file input
retry Number 3 Number of retries for fetching feeds
retry_backoff Number 5 Retry backoff (seconds)
ensure_all Boolean false Ensure that all feeds specified as url input are fetched correctly (== does not skip fetch errors)
allow_empty Boolean false Don't fail action if feed has no items

Formatting

Examples below uses following RSS feed item:

<item>
  <title>Blog Post</title>
  <link>https://blog.example.com/blog-post</link>
  <pubDate>Sat, 05 Aug 2020 00:00:00 +0000</pubDate>
</item>

Variables

Key Example Note
title Blog Post
url https://blog.example.com/blog-post
year 2020 timezone affects
month 8 timezone affects.
monthshort Aug timezone affects.
monthlong August timezone affects.
day 5 timezone affects.
date 8/5/2020, 12:00:00 AM timezone affects.

For details, see src/format.ts

Padding

You can padding variables with zeros or spaces.

Format Output Description
${2day} 5 Pads to length 2 with spaces
${05month} 00008 Pads to length 5 with zeros

Outputs

  • changed: Whether the document is changed while this actions's run. 1 if changed, 0 else.

  • items: Raw feed entry from rssparser.

    [
      {
        "title":"C.UTF-8 とは何だったのか",
        "link":"https://note.sarisia.cc/entry/what-is-c-utf8/","pubDate":"Fri, 21 Aug 2020 00:00:00 +0000",
        "content":"TL;DR 全ての Linux ディス...",
        "guid":"https://note.sarisia.cc/entry/what-is-c-utf8/",
        "isoDate":"2020-08-21T00:00:00.000Z"
      },
      ...
    ]
  • newlines: New lines inserted to the document specified as file. Lines are joined with \n.

    <!-- feed start -->
    - Aug 10 - [fish スクリプトのデバッグ](https://note.sarisia.cc/entry/debugging-fish-script/)
    - Aug 08 - [Arch Linux Install Battle](https://note.sarisia.cc/entry/arch-linux-install-battle/)
    - Aug 05 - [Linuxbrew で emscripten を導入する](https://note.sarisia.cc/entry/linuxbrew-emscripten/)
    - Jul 29 - [UWP アプリは localhost へ接続できない](https://note.sarisia.cc/entry/uwp-localhost/)
    - Jul 22 - [Linuxbrew で入れた Go でビルドしたバイナリは可搬性が無い](https://note.sarisia.cc/entry/linuxbrew-go/)
    <!-- feed end -->
    
  • result: Result document with feed lines inserted. Lines are joined with \n

    # Actions Readme Feed
    
    Display RSS feed in your [GitHub Profile README](https://docs.github.com/en/github/setting-up-and-managing-your-github-profile/managing-your-profile-readme)
    ...
    

Examples

Other sources (e.g. Qiita)

Not only Qiita, you can use any RSS feeds which rss-parser supports.

- uses: sarisia/actions-readme-feed@v1
  with:
    url: 'https://qiita.com/sarisia/feed'
    file: 'README.md'

Update GitHub Profile README automatically

Make your workflow with schedule trigger.

on:
  schedule:
    - cron: '0 */6 * * *'

jobs:
  readme:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: sarisia/actions-readme-feed@v1
        id: feed
        with:
          url: 'https://note.sarisia.cc/index.xml'
          file: 'README.md'
      - if: ${{ steps.feed.outputs.changed == true }}
        uses: sarisia/actions-commit@master

Using changed output

changed output can be used directly in the if conditional.

steps:
  - uses: sarisia/actions-readme-feed@v1
    id: feed
    with:
      url: 'https://blog.example.com/feed.xml'
      file: 'README.md'
  - if: ${{ steps.feed.outputs.changed == true }}
    run: echo "changed!"

Multiple feeds (merged)

You can pass multiple URLs to url and get results with all feeds merged & sorted by date!

- name: merged feed
  uses: sarisia/actions-readme-feed@v1
  with:
    file: 'README.md'
    url: |
      https://note.sarisia.cc/index.xml
      https://qiita.com/sarisia/feed
      https://zenn.dev/sarisia/feed

Multiple feeds (separated)

Make sure to change start_flag and end_flag for each feed.

- name: blog
  uses: sarisia/actions-readme-feed@v1
  with:
    url: 'https://note.sarisia.cc/index.xml'
    file: 'README.md'
    start_flag: "<!-- blog start -->"
    end_flag: "<!-- blog end -->"
- name: qiita
  uses: sarisia/actions-readme-feed@v1
  with:
    url: 'https://qiita.com/sarisia/feed'
    file: 'README.md'
    start_flag: "<!-- qiita start -->"
    end_flag: "<!-- qiita end -->"
### Blog
<!-- blog start -->
<!-- blog end -->

### Qiita
<!-- qiita start -->
<!-- qiita end -->

Using Deploy Key or Personal Access Token

actions/checkout action can handle this.

For deploy key:

- uses: actions/checkout@v2
  with:
    ssh-key: ${{ secrets.DEPLOY_KEY }}
- uses: sarisia/actions-readme-feed@v1

For Personal Access Token:

- uses: actions/checkout@v2
  with:
    token: ${{ secrets.PAT }}
- uses: sarisia/actions-readme-feed@v1

Remarks

locale option needs additional operation

Setting locale option is not working correctly due to the limitation of Node.js shipped with GitHub Actions runner.

If you want this to work, you need to set up ICU data set manually.

You can use the helper action sarisia/setup-icu to do this:

steps:
  - uses: sarisia/setup-icu@v1
  - uses: sarisia/actions-readme-feed@v1
    with:
      url: https://note.sarisia.cc/index.xml
      file: README.md
      locale: 'ja-JP'
Also you can do this manually...
steps:
  - run: npm install icu4c-data@64l
  - uses: sarisia/actions-readme-feed@v1
    with:
      url: https://note.sarisia.cc/index.xml
      file: README.md
      locale: 'ja-JP'
    env:
      NODE_ICU_DATA: node_modules/icu4c-data
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].