Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jahirfiquitiva/profile-readme-action
Custom action to get the user recent activity and blog posts and update the README
https://github.com/jahirfiquitiva/profile-readme-action
actions activity blog blog-posts feed github-actions posts
Last synced: 25 days ago
JSON representation
Custom action to get the user recent activity and blog posts and update the README
- Host: GitHub
- URL: https://github.com/jahirfiquitiva/profile-readme-action
- Owner: jahirfiquitiva
- Created: 2021-11-16T23:58:45.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-17T02:32:31.000Z (about 3 years ago)
- Last Synced: 2024-11-15T03:42:10.386Z (3 months ago)
- Topics: actions, activity, blog, blog-posts, feed, github-actions, posts
- Language: JavaScript
- Homepage: https://github.com/jahirfiquitiva/jahirfiquitiva
- Size: 329 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Profile Readme
This is a GitHub action I created for my [GitHub profile's README](https://github.com/jahirfiquitiva/jahirfiquitiva)
It gets the user's recent activity and the most recent posts from an RSS feed.
## Credits
This project is heavily based on @jamesgeorge007 [GitHub Activity Readme](https://github.com/jamesgeorge007/github-activity-readme) and @actions-js [Profile Readme](https://github.com/actions-js/profile-readme)
Full credits belong to them. I just adapted the code to match my needs
---
## Instructions
- Create a file named `TEMPLATE.md` with the base content you want.
- *(Optional)* Add the comment `` within `TEMPLATE.md`. You can find an example [here](https://github.com/jahirfiquitiva/profile-readme/blob/main/TEMPLATE.md).
- *(Optional)* Add the comment `` within `TEMPLATE.md`. You can find an example [here](https://github.com/jahirfiquitiva/profile-readme/blob/main/TEMPLATE.md).- It's the time to create a workflow file.
`.github/workflows/update-readme.yml`
```yml
name: Update READMEon:
workflow_dispatch:
push:
schedule:
- cron: '0 0/4 * * *'jobs:
update_readme:
runs-on: ubuntu-latest
name: Job to update readme
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update readme with activity and feed
uses: jahirfiquitiva/profile-readme-action@main
id: readme
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
FEED_URL: 'https://hnrss.org/frontpage'
FEED_TO_HTML: true
MAX_FEED_LINES: 4
ACTIVITY_TO_HTML: true
```The above job runs every four hours, you can change it as you wish based on the [cron syntax](https://jasonet.co/posts/scheduled-actions/#the-cron-syntax).
Please note that only those public events that belong to the following list show up:-
- `IssueEvent`
- `IssueCommentEvent`
- `PullRequestEvent`
- `ForkEvent`
- `ReleaseEvent`You can find an example [here](https://github.com/jahirfiquitiva/jahirfiquitiva/blob/master/.github/workflows/main.yml).
### Override defaults
Use the following `input params` to customize it for your use case:-
| Input Param | Default Value | Description |
|--------|--------|--------|
| `COMMIT_MSG` | :sparkles: Update README with the recent activity and blog posts | Commit message used while committing to the repo |
| `MAX_ACTIVITY_LINES` | 5 | The maximum number of lines populated in your readme file |
| `ACTIVITY_TO_HTML` | false | Whether to convert activity markdown to html |
| `FEED_URL` | | The RSS url to get feed from |
| `MAX_FEED_LINES` | 5 | The maximum number of lines for feed populated in your readme file |
| `FEED_TO_HTML` | false | Whether to convert blogs markdown to html |