DEV Community

Discussion on: How To Create A GitHub Profile README

Collapse
jamesgeorge007 profile image
James George

I've built a GitHub Action that updates README with the recent activity of a user.

GitHub logo jamesgeorge007 / github-activity-readme

Updates README with the recent GitHub activity of a user

GitHub Activity in Readme

Updates README.md with the recent GitHub activity of a user.

profile-repo


Instructions

  • Add the comment <!--START_SECTION:activity--> (entry point) within README.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:
  schedule:
    - cron: '*/30 * * * *'
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    name: Update this repo's README with recent activity

    steps:
      - uses: actions/checkout@v2
      - uses: jamesgeorge007/github-activity-readme@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Enter fullscreen mode Exit fullscreen mode

The above job runs every half an hour, 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

You can find an example here.

Override defaults

Use the following input params to customize it for…

Collapse
puneetgopinath profile image
Puneet Gopinath

Hey James George, you no longer maintain it. So here is a fork of it to use instead:

GitHub logo Readme-Workflows / recent-activity

Add your recent activity to your profile readme!

Recent Activity

GitHub stars GitHub forks GitHub issues GitHub repo size Lines of code Discord Chat Contributor Covenant

This GitHub Action is a Fork of the original GitHub Activity Readme Action by jamesgeorge007.
Its our goal is to improve the original GitHub Action while also providing new features for the users.

Live Preview

This is an example live preview that is updated every time a commit is pushed using github actions.

Last Updated: Thursday, May 20th, 2021, 3:17:39 PM (GMT)

  1. ❗️ Closed issue #5 in Readme-Workflows/recent-activity
  2. 🎉 Merged PR #6 in Readme-Workflows/recent-activity
  3. 🗣 Commented on #3 in Readme-Workflows/recent-activity
  4. ❗️ Closed issue #4 in Readme-Workflows/recent-activity
  5. 💪 Opened PR #6 in Readme-Workflows/recent-activity

Settings

The Action currently has the following Settings that you can set through the with option.

Option Description Default Supported Placeholder
GH_USERNAME The User to get latest activity from Repository Owner
COMMIT_MSG The Commit Message to use when updating the README ⚡ Update README with the recent activity
MAX_LINES How many activities to display 5