Debian Codegraph @

.github/workflows/loc-badge.yml

raw symbols SCIP
1 # LoC = Lines of Code
2 name: LoC Badge
3
4 on:
5 # Manual only
6 workflow_dispatch:
7
8 permissions:
9 contents: write
10 pull-requests: write
11
12 jobs:
13 loc-badge:
14 runs-on: ubuntu-latest
15 steps:
16 - name: Checkout
17 uses: actions/checkout@v7
18
19 - name: Generate LoC badge (Apprise library only)
20 uses: alexispurslane/[email protected]
21
22 id: badge
23 with:
24 debug: true
25 # Run from the root of the repo so the pattern paths are exact
26 directory: ./
27 badge: .github/badges/loc.svg
28 patterns: "apprise/**/*.py"
29 ignore: "__pycache__"
30
31 - name: Print the output
32 run: |
33 echo "Scanned: ${{ steps.badge.outputs.counted_files }}";
34 echo "Line Count: ${{ steps.badge.outputs.total_lines }}";
35
36 - name: Create PR (if changed)
37 uses: peter-evans/create-pull-request@v8
38 with:
39 commit-message: "Update Lines of Code (LoC) badge"
40 title: "Update LoC badge"
41 body: "Automated update of the Lines of Code badge."
42 branch: "automation/loc-badge"
43 delete-branch: true
44 add-paths: ".github/badges/loc.svg"