Giter Club home page Giter Club logo

profile-readme-action's Introduction

Profile Readme

This is a GitHub action I created for my GitHub profile's README

It gets the user's recent activity and the most recent posts from an RSS feed.

Credits

This project is heavily based on @jamesgeorge007 GitHub Activity Readme and @actions-js Profile Readme

Full credits belong to them. I just adapted the code to match my needs


Instructions

  • Create a file named TEMPLATE.md with the base content you want.

  • (Optional) Add the comment <!--{{activity}}--> within TEMPLATE.md. You can find an example here.

  • (Optional) Add the comment <!--{{feed}}--> within TEMPLATE.md. You can find an example here.

  • It's the time to create a workflow file.

.github/workflows/update-readme.yml

name: Update README

on:
  workflow_dispatch:
  push:
  schedule:
    - cron: '0 0/4 * * *'

jobs:
  update_readme:
    runs-on: ubuntu-latest
    name: Job to update readme
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Update readme with activity and feed
        uses: jahirfiquitiva/profile-readme-action@main
        id: readme
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          FEED_URL: 'https://hnrss.org/frontpage'
          FEED_TO_HTML: true
          MAX_FEED_LINES: 4
          ACTIVITY_TO_HTML: true

The above job runs every four hours, you can change it as you wish based on the cron syntax.

Please note that only those public events that belong to the following list show up:-

  • IssueEvent
  • IssueCommentEvent
  • PullRequestEvent
  • ForkEvent
  • ReleaseEvent

You can find an example here.

Override defaults

Use the following input params to customize it for your use case:-

Input Param Default Value Description
COMMIT_MSG โœจ Update README with the recent activity and blog posts Commit message used while committing to the repo
MAX_ACTIVITY_LINES 5 The maximum number of lines populated in your readme file
ACTIVITY_TO_HTML false Whether to convert activity markdown to html
FEED_URL The RSS url to get feed from
MAX_FEED_LINES 5 The maximum number of lines for feed populated in your readme file
FEED_TO_HTML false Whether to convert blogs markdown to html

profile-readme-action's People

Contributors

github-actions[bot] avatar jahirfiquitiva avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.