-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 951 Bytes
/
profile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Collect Activity Data
on:
schedule:
- cron: "0 0 * * 0"
jobs:
collect_activity:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Collect Activity Data
run: |
curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/users/${{ github.actor }}/events?per_page=10" \
| jq '.[].created_at' > activity.txt
- name: Update Profile
uses: lowlighter/metrics@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
user: ${{ github.actor }}
config: |
{
"metrics": {
"activity": {
"data": {
"files": "activity.txt"
},
"template": "<h2>Recent Activity</h2>{{#each data}}<p>{{this}}</p>{{/each}}"
}
}
}