This GitHub Action automatically fetches and updates the recent activity of a GitHub user in the specified markdown file (e.g., README.md
).
- Fetches up to a specified number of recent activities from the user's GitHub profile.
- Updates the designated markdown file between the specified comment tags.
- Supports empty commits to keep the workflow active after prolonged inactivity.
- Provides detailed debugging options for verbose logging.
The action supports the following input parameters:
Name | Description | Default |
---|---|---|
token |
Your GitHub PAT or Auth Token | ${{ secrets.GITHUB_TOKEN }} |
username |
The GitHub username to fetch activity for | ${{ github.repository_owner }} |
committer |
The name of the committer | github-actions[bot] |
committer-email |
The email of the committer | github-actions[bot]@users.noreply.github.com |
commit-msg |
Commit message for changes | :zap: Update README with recent activity |
max-lines |
The maximum number of activity entries to show | 5 |
target-file |
The markdown file to update | README.md |
empty-commit-msg |
Message for empty commits (no activity) | :memo: empty commit to keep workflow active |
debug |
Enable verbose logging (set true or false ) |
false |
Here is an example of how to configure the action in your repository:
name: Update GitHub Activity
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
jobs:
update-activity:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get User Activity
uses: offensive-vk/auto-user-activity@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
username: ${{ github.repository_owner }}
commit-msg: "Updated Activity."
target-file: 'readme.md'
- 💪 Opened pull request #7 in offensive-vk/auto-user-activity
- 🎉 Merged pull request #28106 in offensive-vk/offensive-vk
- ✅ Approved on pull request #28106 in offensive-vk/offensive-vk
- 🎉 Merged pull request #27974 in offensive-vk/offensive-vk
- ✅ Approved on pull request #27974 in offensive-vk/offensive-vk
- 🎉 Merged pull request #1 in offensive-vk/Roadmap.sh
- 💪 Opened pull request #1 in offensive-vk/Roadmap.sh
© Vedansh 2020 - Present
Licensed under MIT
Thanks for visiting :)