-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
53 lines (51 loc) · 1.58 KB
/
action.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
name: Used By Action
description: Generate Used By badge from GitHub dependents information.
author: shenxianpeng
branding:
icon: "thumbs-up"
color: "green"
inputs:
repo:
description: GitHub repository name. e.g. shenxianpeng/used-by. Defaults to shenxianpeng/used-by.
required: true
default: 'shenxianpeng/used-by'
file-path:
description: The path to file. Defaults to 'README.md'.
required: false
default: 'README.md'
badge-label:
description: The badge display name. Defaults to 'Used by'.
required: false
default: 'Used by'
badge-color:
description: The badge display color. Defaults to 'informational'.
required: false
default: 'informational'
badge-logo:
description: The badge display color. Defaults to 'slickpic'.
required: false
default: "slickpic"
update-badge:
description: The badge display color. Defaults to 'false'.
required: false
default: "false"
runs:
using: "composite"
steps:
- name: Install used-by
shell: bash
run: |
# try to fix https://github.com/pypa/setuptools/issues/3269
python3 -m pip install pip -U
pip install git+https://github.com/shenxianpeng/used-by.git@main
- name: Run used-by
id: used-by
shell: bash
run: |
used-by \
--repo="${{ inputs.repo }}" \
--file-path="${{ inputs.file-path }}" \
--badge-label="${{ inputs.badge-label }}" \
--badge-color="${{ inputs.badge-color }}" \
--badge-logo="${{ inputs.badge-logo }}" \
--update-badge=${{ inputs.update-badge }}