A collection of GitHub Actions to automatically update your README with dynamic content. Perfect for showcasing your GitHub activity and contributions in your profile!
Automatically showcase your most important pull requests across repositories.
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-->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'The action will run automatically based on your schedule, or you can trigger it manually from the Actions tab.
| 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 |
β |
| 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 |
β |
# 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'- 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'- 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: 15The 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- π’ Merged - PR has been successfully merged
- π‘ Open - PR is currently open and under review
- π΄ Closed - PR was closed without merging
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'with:
ACTION_TYPE: 'pinned_prs'
REPOSITORIES: 'microsoft/vscode,facebook/react,google/tensorflow'with:
ACTION_TYPE: 'pinned_prs'
BLACKLIST: '123,456,789' # Hide PRs #123, #456, and #789- Quick Start Guide - Get up and running in minutes
- Configuration Options - Complete reference for all inputs
- Example Configurations - Common usage patterns
- Examples - Ready-to-use workflow files
- Contributing Guide - How to contribute to this project
- Development Guide - Local development setup and workflow
- Release Guide - Release process and versioning
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 pipelineContributions are welcome! Please read the Contributing Guide.
Quick contribution steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/NewFeature) - Follow the Development Guide for local setup
- Run
make checkto ensure your changes pass all tests - Commit your changes (
git commit -m 'Add some NewFeature') - Push to the branch (
git push origin feature/NewFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by jamesgeorge007/github-activity-readme
- Built using GitHub Actions
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!