The GitHub Actions for adding simple widgets to your profile readme.
An example workflow to authenticate with GitHub Platform:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
persist-credentials: false
fetch-depth: 0
- name: Create README.md
uses: actions-js/profile-readme@master
with:
username: <your username>
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
## my cool name
### π£ My activity:
<!--GITHUB_ACTIVITY:{"rows": 5}-->
---
<p align="center">
Last refresh:
<b><!--TIMESTAMP--></b>
</p>
All widgets are identified by and HTML commend containing only a name and
optionally a JSON configuration, appended after the name, separated by a :
.
JSON configuration are always optional.
Display your most recent GitHub activity
<!--GITHUB_ACTIVITY:{"rows": 5, "raw": true}-->
displays as:
πͺ Opened PR #43 in webview/webview_deno
βοΈ Closed issue #32 in denosaurs/denon
π£ Commented on #6 in nestdotland/hatcher
βοΈ Closed issue #22 in nestdotland/eggs
π£ Commented on #15 in nestdotland/eggs
option | value | default | description |
---|---|---|---|
rows | string | 10 |
Maximum number of rows to generate. |
raw | boolean | false |
Strip markdown formatting. |
include | string[] | all | Select which of the supported events you want to include in the showcase. |
exclude | string[] | [] |
Select which of the supported events you want to exclude in the showcase. |
"IssueCommentEvent",
"IssuesEvent",
"PullRequestEvent",
"ForkEvent",
"ReleaseEvent",
"PushEvent";
Display your most recent GitHub activity
<!--GITHUB_REPOS:{"rows": 4, "raw": true}-->
displays as:
π¦ webview/webview_deno: βοΈ 439
π¦ denosaurs/denon: βοΈ 415
π¦ nestdotland/eggs: βοΈ 8
π¦ nestdotland/hatcher: βοΈ 2
option | value | default | description |
---|---|---|---|
rows | string | 10 |
Maximum number of rows to generate. |
sort | string | "stars" |
Sort repositories by "stars", "created", "updated", "pushed", "full_name". |
raw | boolean | false |
Strip markdown formatting. |
Display your most recent GitHub activity
<!--TIMESTAMP:{"format": "dddd, MMMM Do YYYY, h:mm:ss"}-->
displays as:
Tuesday, July 21st 2020, 8:52:54 am UTC
option | value | default | description |
---|---|---|---|
format | string | ISO 8601 | moment format. |
tz | boolean | UTC | moment timezone. |
Display items from web feeds such as rss or atom.
<!--FEED:{"rows": 5, "select": "hackernews show", shuffle: true, "title": true }-->
<!--FEED:{"rows": 5, "select": ["hackernews ask", "hackernews show"], "raw": true, "title": true }-->
displays as:
This is generated from feed provided here. Add it to your rss reader!
This is generated from feed provided here. Add it to your rss reader!
-
Show HN: Johariapp β For individuals to track their performance on Johari Window (johariapp.com)
-
Show HN: Create and Monetize your Zoom Events in under 2 Minutes (ditto.video)
-
Show HN: Compare various PDF-to-text libraries in a few clicks (www.apibatchtest.com)
-
Show HN: UDT Courseware β Train people how to label a dataset (universaldatatool.com)
-
Show HN: An OpenStreetMap Gutenberg Block for WordPress (wordpress.org)
option | value | default | description |
---|---|---|---|
rows | number | 5 |
Number of items to display |
raw | boolean | false |
Strip table markdown |
shuffle | boolean | false |
Shuffle the items from the feed |
title | boolean | false |
Controls whether to add a title automatically from the feed. |
select | string[] | all[] |
Select specific feeds to display. |
Here's what FEEDS.json
looks like.
{
"hackernews top": "https://hnrss.org/frontpage",
"hackernews show": "https://hnrss.org/show",
"hackernews ask": "https://hnrss.org/show"
}
name | value | default | description |
---|---|---|---|
github_token | string | Token for the repo. Can be passed in using ${{ secrets.GITHUB_TOKEN }} . |
|
username | string | Github profile username. | |
feed | string | "FEEDS.json" | FEEDS.json file |
template | string | './TEMPLATE.md' | TEMPLATE.md file path. |
readme | string | './README.md' | README.md output file path. |
The scripts and documentation in this project are released under the MIT License.