-
Notifications
You must be signed in to change notification settings - Fork 3
157 lines (155 loc) · 7.02 KB
/
add-badges.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: Add Badges
on: push
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: 🚧 Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
- name: ⤵️ Checkout
uses: actions/checkout@v2
- name: 🚧 Install
run: yarn install
- name: 📦 Build
run: yarn build
- name: 🔑 Generate Token
uses: wow-actions/use-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
env_name: bot_token
- name: 🎯 Badges
uses: ./
env:
repo_url: ${{ github.event.repository.html_url }}
repo_name: ${{ github.event.repository.name }}
repo_owner: ${{ github.event.repository.owner.login }}
with:
GITHUB_TOKEN: ${{ env.bot_token }}
center: true
badges: |
[
{
"badge": "https://img.shields.io/github/license/${{ env.repo_owner }}/${{ env.repo_name }}?style=flat-square",
"alt": "MIT License",
"link": "${{ env.repo_url }}/blob/master/LICENSE"
},
{
"badge": "https://img.shields.io/badge/language-TypeScript-blue.svg?style=flat-square",
"alt": "Language",
"link": "https://www.typescriptlang.org"
},
{
"badge": "https://img.shields.io/badge/PRs-Welcome-brightgreen.svg?style=flat-square",
"alt": "PRs Welcome",
"link": "${{ env.repo_url }}/pulls"
},
{
"badge": "https://img.shields.io/static/v1?label=&labelColor=505050&message=marketplace&color=0076D6&style=flat-square&logo=google-chrome&logoColor=0076D6",
"alt": "website",
"link": "https://github.com/marketplace/actions/${{ env.repo_name }}"
},
{
"badge": "https://img.shields.io/github/actions/workflow/status/${{ env.repo_owner }}/${{ env.repo_name }}/release.yml?branch=master&logo=github&style=flat-square",
"alt": "build",
"link": "${{ env.repo_url }}/actions/workflows/release.yml"
},
{
"badge": "https://img.shields.io/lgtm/grade/javascript/g/${{ env.repo_owner }}/${{ env.repo_name }}.svg?logo=lgtm&style=flat-square",
"alt": "Language grade: JavaScript",
"link": "https://lgtm.com/projects/g/${{ env.repo_owner }}/${{ env.repo_name }}/context:javascript"
}
]
- name: 🎯 Badges 1
uses: ./
env:
repo_url: ${{ github.event.repository.html_url }}
repo_name: ${{ github.event.repository.name }}
repo_owner: ${{ github.event.repository.owner.login }}
with:
GITHUB_TOKEN: ${{ env.bot_token }}
opening_comment: '<!-- [START BADGES 1] -->'
closing_comment: '<!-- [END BADGES 1] -->'
badges: |
[
{
"badge": "https://img.shields.io/github/license/${{ env.repo_owner }}/${{ env.repo_name }}?style=flat-square",
"alt": "MIT License",
"link": "${{ env.repo_url }}/blob/master/LICENSE"
},
{
"badge": "https://img.shields.io/badge/language-TypeScript-blue.svg?style=flat-square",
"alt": "Language",
"link": "https://www.typescriptlang.org"
},
{
"badge": "https://img.shields.io/badge/PRs-Welcome-brightgreen.svg?style=flat-square",
"alt": "PRs Welcome",
"link": "${{ env.repo_url }}/pulls"
},
{
"badge": "https://img.shields.io/static/v1?label=&labelColor=505050&message=marketplace&color=0076D6&style=flat-square&logo=google-chrome&logoColor=0076D6",
"alt": "website",
"link": "https://github.com/marketplace/actions/${{ env.repo_name }}"
},
{
"badge": "https://img.shields.io/github/actions/workflow/status/${{ env.repo_owner }}/${{ env.repo_name }}/release.yml?branch=master&logo=github&style=flat-square",
"alt": "build",
"link": "${{ env.repo_url }}/actions/workflows/release.yml"
},
{
"badge": "https://img.shields.io/lgtm/grade/javascript/g/${{ env.repo_owner }}/${{ env.repo_name }}.svg?logo=lgtm&style=flat-square",
"alt": "Language grade: JavaScript",
"link": "https://lgtm.com/projects/g/${{ env.repo_owner }}/${{ env.repo_name }}/context:javascript"
}
]
- name: 🎯 Badges 2
uses: ./
env:
repo_url: ${{ github.event.repository.html_url }}
repo_name: ${{ github.event.repository.name }}
repo_owner: ${{ github.event.repository.owner.login }}
with:
GITHUB_TOKEN: ${{ env.bot_token }}
center: true
opening_comment: '<!-- [START BADGES 2] -->'
closing_comment: '<!-- [END BADGES 2] -->'
badges: |
[
[
{
"badge": "https://img.shields.io/github/license/${{ env.repo_owner }}/${{ env.repo_name }}?style=flat-square",
"alt": "MIT License",
"link": "${{ env.repo_url }}/blob/master/LICENSE"
},
{
"badge": "https://img.shields.io/badge/language-TypeScript-blue.svg?style=flat-square",
"alt": "Language",
"link": "https://www.typescriptlang.org"
},
{
"badge": "https://img.shields.io/badge/PRs-Welcome-brightgreen.svg?style=flat-square",
"alt": "PRs Welcome",
"link": "${{ env.repo_url }}/pulls"
},
{
"badge": "https://img.shields.io/static/v1?label=&labelColor=505050&message=marketplace&color=0076D6&style=flat-square&logo=google-chrome&logoColor=0076D6",
"alt": "website",
"link": "https://github.com/marketplace/actions/${{ env.repo_name }}"
}
],
[
{
"badge": "https://img.shields.io/github/actions/workflow/status/${{ env.repo_owner }}/${{ env.repo_name }}/release.yml?branch=master&logo=github&style=flat-square",
"alt": "build",
"link": "${{ env.repo_url }}/actions/workflows/release.yml"
},
{
"badge": "https://img.shields.io/lgtm/grade/javascript/g/${{ env.repo_owner }}/${{ env.repo_name }}.svg?logo=lgtm&style=flat-square",
"alt": "Language grade: JavaScript",
"link": "https://lgtm.com/projects/g/${{ env.repo_owner }}/${{ env.repo_name }}/context:javascript"
}
]
]