Skip to content

Commit aa7e4b4

Browse files
committed
LOC workflow added
1 parent 9163dcc commit aa7e4b4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/lines-of-code.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Count Lines of Code
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
cloc:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/[email protected]
13+
14+
- name: Count Lines of Code (cloc)
15+
uses: djdefi/cloc-action@6
16+
with:
17+
options: --json --report-file=loc-meta.json
18+
19+
- name: Commit and push changes
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
run: |
23+
git config --global user.name 'github-actions[bot]'
24+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
25+
git add loc-meta.json
26+
git commit -m 'LOC updated'
27+
git push

0 commit comments

Comments
 (0)