-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (58 loc) · 1.96 KB
/
status.yaml
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
name: Update Badge
env:
CODESTATUSSCRIPT: "./hack/codeCoverage.sh"
E2ESTATUSSCRIPT: "./hack/e2ecover.sh"
TODOSCRIPT: "./hack/todocover.sh"
on:
push:
branches:
- main
jobs:
update-badges:
name: Update Badges
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Download cloc
run: sudo apt-get update -y && sudo apt-get install -y cloc
- name: Get the Numbers
shell: bash
run: |
TOOL_PATH=${{ env.CODESTATUSSCRIPT }}
COMMENT_PERCENTAGE=$( ${TOOL_PATH} --comment-percent )
CODE_LINES=$( ${TOOL_PATH} --code-lines )
echo "CODE_LINES=${CODE_LINES}" >> $GITHUB_ENV
TOOL_PATH=${{ env.TODOSCRIPT }}
TODO_STATUS=$( ${TOOL_PATH} )
echo "TODO_STATUS=${TODO_STATUS}" >> $GITHUB_ENV
echo "COMMENT_PERCENTAGE=${COMMENT_PERCENTAGE}" >> $GITHUB_ENV
- name: Create Lines-of-Code-Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 6b05882662346c2592a432226bf3d249
filename: code-lines.json
label: Code Lines
message: ${{ env.CODE_LINES }}
color: lightgrey
- name: Create TODO-Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 82aa5e4487e1870aa206c1d713429345
filename: todo.json
label: todo
message: ${{ env.TODO_STATUS }}
color: lightgrey
- name: Create Comments-Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 92ef1f04e61af8f8b970c0b15f51c7a8
filename: comment.json
label: Comments
message: ${{ env.COMMENT_PERCENTAGE }}%
valColorRange: ${{ env.COMMENT_PERCENTAGE }}
maxColorRange: 100
minColorRange: 0