Skip to content

πŸ—“ Generate a README.md summary for your events repository

License

Notifications You must be signed in to change notification settings

AnandChowdhary/events-summary

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

πŸ—“ Events Summary GitHub Action

This GitHub Action generates a README.md summary for your events repository. You can use the repository as a source of truth for the events you participate it.

Build CI Release CI Node CI

πŸ‘©β€πŸ’» Getting started

First, setup your repository with this file structure:

β”œβ”€β”€ README.md
β”œβ”€β”€ .github
β”‚   └── workflows
β”‚       └── readme.yml
└── events
    β”œβ”€β”€ 2019
    β”‚   β”œβ”€β”€ event-name.md
    β”‚   └── another-event-name.md
    └── 2020
        └── a-third-event-name.md

Add the following comment in your README.md file. This will be replaced with a summary of the events you've participated it:

<!--events--><!--/events-->

Finally, create the GitHub Actions workflow in .github/workflows/readme.yml:

name: Readme CI
on:
  push:
    branches: [main]
  schedule:
    - cron: "0 0 * * *"
jobs:
  release:
    name: Update README
    runs-on: ubuntu-18.04
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Update event summary
        uses: AnandChowdhary/events-summary@main
        with:
          token: "${{ secrets.GITHUB_TOKEN }}"
      - name: Publish package
        uses: stefanzweifel/git-auto-commit-action@v4.9.2
        with:
          commit_message: ":pencil: Generate README summary [skip ci]"

Your README.md file should then contains a summary of the events in the events directory:

Screenshot of README.md

πŸ“„ License