forked from Schneegans/Fly-Pie
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.19 KB
/
badges.yml
File metadata and controls
40 lines (38 loc) · 1.19 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
name: Badges
on:
push:
branches:
- develop
jobs:
update-badges:
name: Update Badges
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Download cloc
run: sudo apt-get update -y && sudo apt-get install -y cloc
- name: Get the Numbers
run: |
echo "CODE_LINES=$(scripts/cloc.sh --loc)" >> $GITHUB_ENV
echo "COMMENT_LINES=$(scripts/cloc.sh --percentage)%" >> $GITHUB_ENV
- name: Create Lines-of-Code-Badge
uses: schneegans/dynamic-badges-action@v1.1.0
with:
auth: ${{ secrets.UPLOAD_BADGES }}
gistID: 8f6459c2417de7534f64d98360dde865
filename: loc.json
label: Lines of Code
message: ${{ env.CODE_LINES }}
color: lightgrey
labelColor: 303030
- name: Create Comments-Badge
uses: schneegans/dynamic-badges-action@v1.1.0
with:
auth: ${{ secrets.UPLOAD_BADGES }}
gistID: 8f6459c2417de7534f64d98360dde865
filename: comments.json
label: Comments
message: ${{ env.COMMENT_LINES }}
color: green
labelColor: 303030