-
-
Notifications
You must be signed in to change notification settings - Fork 16
102 lines (96 loc) · 4.13 KB
/
main.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# This is a workflow showing most of lowlighter/metrics features
# If you forked this repository, you should only keep the "github-metrics-personal" job,
# and delete the "github-metrics" as it is only used to generate examples
#
# See https://github.com/lowlighter/metrics/blob/master/action.yml for full options reference
# See https://github.com/lowlighter/metrics for additional documentation
#
# You'll notice that my workflow use a lot of different tokens :
# - GITHUB_TOKEN which is an auto-generated token provided by GitHub used to commit your metrics on your repository
# - METRICS_TOKEN which is my personal scope-less token
# - METRICS_BOT_TOKEN which is a bot account token with more scopes that I use for plugins which requires additional scopes
#
# There are also a few application tokens :
# - PAGESPEED_TOKEN which is a PageSpeed API token (optional for "plugin_pagespeed")
# - TWITTER_TOKEN which is twitter API token (mandatory for "plugin_tweets")
# - SPOTIFY_TOKENS which contains a client_id, client_secret and a refresh_token for Spotify (mandatory for some mode of "plugin_music")
#
# The workflow is planned for every hour, but you can change its frequency if you want,
# though it's useless to put something lower than 15 minutes as your rendered metrics will probably still be cached by GitHub
#
# It will also run on each manual commit on "master" branch
name: GitHub metrics
on:
schedule:
- cron: "0 * * * *"
push:
branches:
- master
workflow_dispatch:
jobs:
# The job below generates the images displayed on lowlighter/lowlighter
# You can reuse these steps if you want to have a profile page similar to mine.
github-metrics-personal:
runs-on: ubuntu-latest
steps:
- name: Personal metrics
uses: lowlighter/metrics@latest
with:
filename: assets/metrics.svg
token: ${{ secrets.METRICS_TOKEN }}
committer_token: ${{ secrets.GITHUB_TOKEN }}
base: "header, activity, repositories"
plugin_lines: yes
plugin_isocalendar: yes
plugin_traffic: yes
plugin_languages: yes
plugin_languages_ignored: jupyter%20notebook
plugin_languages_skipped: ''
plugin_habits: yes
plugin_habits_from: 200
plugin_habits_days: 14
plugin_habits_facts: yes
plugin_habits_charts: yes
plugin_gists: yes
plugin_topics: yes
plugin_topics_sort: stars
plugin_topics_limit: 15
config_timezone: America/Los_Angeles
# config_order: base.header, isocalendar, base.repositories
config_padding: 10%
- name: Personal metrics (additional)
uses: lowlighter/metrics@latest
with:
filename: assets/metrics.additional.svg
token: ${{ secrets.METRICS_TOKEN }}
committer_token: ${{ secrets.GITHUB_TOKEN }}
base: ""
config_timezone: America/Los_Angeles
# config_order: languages, pagespeed, habits, stargazers, stars
config_padding: 10%
plugin_music: yes
plugin_music_provider: spotify
plugin_music_mode: recent
plugin_music_token: "${{ secrets.SPOTIFY_CLIENT_ID }}, ${{ secrets.SPOTIFY_CLIENT_SECRET }}, ${{ secrets.SPOTIFY_REFRESH_TOKEN }}"
plugin_music_limit: 5
plugin_tweets: yes
plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }}
plugin_activity: yes
plugin_activity_limit: 5
plugin_activity_days: 14
plugin_stargazers: yes
plugin_stars: yes
plugin_stars_limit: 3
# # Note the job below use a bot token with "public_repo" scope
# - name: Personal projects
# uses: lowlighter/metrics@latest
# with:
# filename: metrics.projects.svg
# token: ${{ secrets.METRICS_BOT_TOKEN }}
# committer_token: ${{ secrets.GITHUB_TOKEN }}
# user: lowlighter
# base: ""
# plugin_projects: yes
# plugin_projects_repositories: lowlighter/metrics/projects/1
# plugin_projects_limit: 0
# config_timezone: America/Los_Angeles