-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
122 lines (118 loc) · 4.55 KB
/
Copy pathaction.yml
File metadata and controls
122 lines (118 loc) · 4.55 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: README Language Cards
description: Generate configurable language stats SVG cards for GitHub profile READMEs.
author: One-Simon
branding:
icon: bar-chart-2
color: blue
inputs:
token:
description: GitHub token used to read repositories, language data, and commit data for recent renders.
required: true
username:
description: GitHub username to generate stats for. Defaults to the repository owner.
required: false
default: ${{ github.repository_owner }}
max-languages:
description: Maximum number of languages to display, including Other when lower-ranked languages are grouped.
required: false
default: "10"
grouping:
description: Group the smallest languages into Other until the bucket is near 5 percent.
required: false
default: "true"
commit:
description: Commit and push generated SVG and README display changes using the workflow checkout credentials.
required: false
default: "true"
hide-languages:
description: Comma-separated list of languages to exclude after loading all detected languages.
required: false
default: HTML,CSS,JSON
include-forks:
description: Include forked repositories.
required: false
default: "false"
include-archived:
description: Include archived repositories.
required: false
default: "false"
include-profile-repo:
description: Include the profile repository named the same as the username.
required: false
default: "false"
affiliation:
description: Repository affiliation query for /user/repos. Use owner for owned repos, or owner,collaborator,organization_member for broader access.
required: false
default: owner
visibility:
description: Repository visibility query for /user/repos. Use all, public, or private.
required: false
default: all
title:
description: SVG title.
required: false
default: ""
style:
description: SVG rendering style. Use normal for the full card or compact for the labeled bar-only layout.
required: false
default: normal
timeframe:
description: Use all-time for current language byte totals, or a positive number of weeks for recent commit change totals.
required: false
default: all-time
show-values:
description: Show byte or change totals in the normal renderer. Compact always shows percentages only.
required: false
default: "true"
user-agent:
description: User-Agent header for GitHub API requests.
required: false
default: GitStats-language-card
readme-config:
description: README path containing GitStats config blocks.
required: false
default: README.md
api-request-timeout-ms:
description: Maximum time to wait for each GitHub API request before failing or retrying.
required: false
default: "15000"
api-max-retry-seconds:
description: Maximum total time to spend retrying transient GitHub API failures.
required: false
default: "60"
api-rate-limit-buffer:
description: Minimum GitHub API requests to leave unused when estimating recent card commit-detail work.
required: false
default: "50"
outputs:
generated-files:
description: Newline-separated paths to the generated SVG files.
value: ${{ steps.generate.outputs.generated-files }}
runs:
using: composite
steps:
- name: Generate GitStats language SVG
id: generate
shell: bash
env:
GITSTATS_TOKEN: ${{ inputs.token }}
GITSTATS_USERNAME: ${{ inputs.username }}
GITSTATS_MAX_LANGUAGES: ${{ inputs.max-languages }}
GITSTATS_GROUPING: ${{ inputs.grouping }}
GITSTATS_COMMIT: ${{ inputs.commit }}
GITSTATS_HIDE_LANGUAGES: ${{ inputs.hide-languages }}
GITSTATS_INCLUDE_FORKS: ${{ inputs.include-forks }}
GITSTATS_INCLUDE_ARCHIVED: ${{ inputs.include-archived }}
GITSTATS_INCLUDE_PROFILE_REPO: ${{ inputs.include-profile-repo }}
GITSTATS_AFFILIATION: ${{ inputs.affiliation }}
GITSTATS_VISIBILITY: ${{ inputs.visibility }}
GITSTATS_TITLE: ${{ inputs.title }}
GITSTATS_STYLE: ${{ inputs.style }}
GITSTATS_TIMEFRAME: ${{ inputs.timeframe }}
GITSTATS_SHOW_VALUES: ${{ inputs.show-values }}
GITSTATS_USER_AGENT: ${{ inputs.user-agent }}
GITSTATS_README_CONFIG: ${{ inputs.readme-config }}
GITSTATS_API_REQUEST_TIMEOUT_MS: ${{ inputs.api-request-timeout-ms }}
GITSTATS_API_MAX_RETRY_SECONDS: ${{ inputs.api-max-retry-seconds }}
GITSTATS_API_RATE_LIMIT_BUFFER: ${{ inputs.api-rate-limit-buffer }}
run: node "$GITHUB_ACTION_PATH/src/generate-languages.mjs"