Skip to content

Commit 3e96817

Browse files
docs: add instructions
1 parent 7a0f41d commit 3e96817

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,39 @@ Updates `README.md` with the recent GitHub activity of a user.
55
<img width="735" alt="profile-repo" src="https://user-images.githubusercontent.com/25279263/87703301-3aa4a500-c7b8-11ea-8eb6-245121997a7b.png">
66

77
---
8+
9+
## Instructions
10+
11+
- Add the comment `<!--START_SECTION:activity-->` (entry point) within `README.md`. You can find an example [here](https://github.com/jamesgeorge007/jamesgeorge007/blob/master/README.md).
12+
13+
- Create a [personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with `repo` scope and store it as a [secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) from the repo settings.
14+
15+
- It's the time to create a workflow file.
16+
17+
`.github/workflows/update-readme.yml`
18+
19+
```yml
20+
name: Update README
21+
22+
on:
23+
schedule:
24+
- cron: '*/30 * * * *'
25+
26+
jobs:
27+
build:
28+
runs-on: ubuntu-latest
29+
30+
steps:
31+
- uses: actions/checkout@v2
32+
- uses: jamesgeorge007/github-activity-readme@master
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
GH_PAT: ${{ secrets.GH_PAT }}
36+
GH_USERNAME: <username>
37+
```
38+
39+
The above job runs every half an hour, you can change it as you wish based on the [cron syntax](https://jasonet.co/posts/scheduled-actions/#the-cron-syntax).
40+
41+
You can find an example [here](https://github.com/jamesgeorge007/jamesgeorge007/blob/master/.github/workflows/update-readme.yml).
42+
43+
_Inspired by [JasonEtco/activity-box](https://github.com/JasonEtco/activity-box)_

0 commit comments

Comments
 (0)