Skip to content

highlyavailable/github-readme-actions

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitHub README Actions

GitHub release GitHub marketplace MIT License

A collection of GitHub Actions to automatically update your README with dynamic content. Perfect for showcasing your GitHub activity and contributions in your profile!

✨ Available Actions

🎯 Pinned Pull Requests

Automatically showcase your most important pull requests across repositories.

πŸš€ Quick Start

1. Add Comments to Your README

Add the following comments to your README.md where you want the content to appear:

## πŸ“Œ Pinned Pull Requests

<!--START_SECTION:github-readme-actions-pinned_prs-->
<!--END_SECTION:github-readme-actions-pinned_prs-->

2. Create Workflow File

Create .github/workflows/update-readme.yml:

name: Update README

on:
  schedule:
    - cron: '0 */6 * * *'  # Every 6 hours
  workflow_dispatch:

jobs:
  update-readme:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    
    steps:
      - uses: actions/checkout@v4
      - uses: highlyavailable/github-readme-actions@main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          ACTION_TYPE: 'pinned_prs'

3. Trigger the Action

The action will run automatically based on your schedule, or you can trigger it manually from the Actions tab.

πŸ“‹ Configuration Options

Core Inputs

Input Description Default Required
GITHUB_TOKEN GitHub token for API access (can be provided via with: or env:) - βœ…
ACTION_TYPE Type of action (pinned_prs, more coming soon) pinned_prs ❌
GH_USERNAME GitHub username to fetch data for Repository owner ❌
TARGET_FILE File to update README.md ❌
COMMIT_MSG Commit message πŸš€ Update README with GitHub actions ❌
COMMIT_NAME Committer name github-actions[bot] ❌
COMMIT_EMAIL Committer email 41898282+github-actions[bot]@users.noreply.github.com ❌

Pinned PRs Specific Inputs

Input Description Default Required
MAX_LINES Maximum number of PRs to display 5 ❌
PR_STATE Filter by PR state (open, closed, merged, all) all ❌
START_DATE Start date for filtering (YYYY-MM-DD) - ❌
END_DATE End date for filtering (YYYY-MM-DD) - ❌
BLACKLIST Comma-separated PR numbers to exclude - ❌
REPOSITORIES Comma-separated list of repos (owner/repo) Searches all PRs across GitHub ❌
INCLUDE_DRAFT Include draft PRs false ❌
SORT_BY Sort PRs by (created, updated, popularity) updated ❌

🎨 Example Configurations

Basic Pinned PRs

# Option 1: Token via environment (recommended)
- uses: highlyavailable/github-readme-actions@main
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  with:
    ACTION_TYPE: 'pinned_prs'

# Option 2: Token via inputs
- uses: highlyavailable/github-readme-actions@main
  with:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    ACTION_TYPE: 'pinned_prs'

Advanced Pinned PRs Configuration

- uses: highlyavailable/github-readme-actions@main
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  with:
    ACTION_TYPE: 'pinned_prs'
    MAX_LINES: 10
    PR_STATE: 'merged'
    START_DATE: '2024-01-01'
    INCLUDE_DRAFT: 'true'
    SORT_BY: 'created'
    BLACKLIST: '123,456,789'
    REPOSITORIES: 'owner/repo1,owner/repo2'
    COMMIT_MSG: 'πŸš€ Updated pinned PRs showcase'

Filter by Date Range

- uses: highlyavailable/github-readme-actions@main
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  with:
    ACTION_TYPE: 'pinned_prs'
    START_DATE: '2024-01-01'
    END_DATE: '2024-12-31'
    PR_STATE: 'merged'
    MAX_LINES: 15

πŸ“Š Output Format

Pinned Pull Requests

The action generates a clean, formatted list of your PRs:

- 🟒 [Add new feature for user authentication](https://github.com/owner/repo/pull/123) - owner/repo | [Issue #45](https://github.com/owner/repo/issues/45)
- 🟑 [Fix bug in payment processing](https://github.com/owner/repo/pull/124) - owner/repo
- πŸ”΄ [Update documentation for API endpoints](https://github.com/owner/repo/pull/125) - owner/repo

Status Indicators

  • 🟒 Merged - PR has been successfully merged
  • 🟑 Open - PR is currently open and under review
  • πŸ”΄ Closed - PR was closed without merging

πŸ”§ Advanced Usage

Multiple Actions in One Workflow

steps:
  - uses: actions/checkout@v4
  
  # Update pinned PRs
  - uses: highlyavailable/github-readme-actions@main
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    with:
      ACTION_TYPE: 'pinned_prs'
      MAX_LINES: 5
  
  # Future: Add more actions
  # - uses: highlyavailable/github-readme-actions@main
  #   env:
  #     GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  #   with:
  #     ACTION_TYPE: 'new_action'

Filtering Specific Repositories

with:
  ACTION_TYPE: 'pinned_prs'
  REPOSITORIES: 'microsoft/vscode,facebook/react,google/tensorflow'

Hiding Specific PRs

with:
  ACTION_TYPE: 'pinned_prs'
  BLACKLIST: '123,456,789'  # Hide PRs #123, #456, and #789

πŸ“š Documentation

For Users

For Contributors & Developers

Quick Commands

If you're developing locally, use our Makefile for common tasks:

make help          # Show all available commands
make dev           # Full development workflow
make test          # Run tests
make ci            # Run CI pipeline

🀝 Contributing

Contributions are welcome! Please read the Contributing Guide.

Quick contribution steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/NewFeature)
  3. Follow the Development Guide for local setup
  4. Run make check to ensure your changes pass all tests
  5. Commit your changes (git commit -m 'Add some NewFeature')
  6. Push to the branch (git push origin feature/NewFeature)
  7. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support

If you have any questions or run into issues, please open an issue on GitHub.


⭐ If you find this action helpful, please consider giving it a star!

About

A collection of GitHub Actions to automatically update your README with dynamic content

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published