-
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (45 loc) · 1.28 KB
/
main.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
name: Count Lines of Code
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build_linux_x64:
name: Build Linux 64-bit
uses: ./.github/workflows/Build-Linux-x64.yml
secrets: inherit
build_linux_x86:
name: Build Linux 32-bit
uses: ./.github/workflows/Build-Linux-x86.yml
secrets: inherit
needs: build_linux_x64
cloc:
name: Count Lines of Code
runs-on: ubuntu-latest
needs:
- build_linux_x64
- build_linux_x86
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Count Lines of Code (cloc)
uses: djdefi/cloc-action@main
with:
options: --report-file=cloc.txt
- run: csplit README.md /\<\!--CLOC/ {1}
- run: cp xx00 README.md
- run: echo "<!--CLOC-START -->" >> README.md
- run: echo "\`\`\`" >> README.md
- run: echo "NOW=$(date +'%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_ENV
- run: echo "Last Updated at ${{ env.NOW }}" >> README.md
- run: tail -n +2 cloc.txt >> README.md
- run: echo "\`\`\`" >> README.md
- run: cat xx02 >> README.md
- uses: stefanzweifel/git-auto-commit-action@v5
with:
skip_dirty_check: true
branch: main
file_pattern: 'README.md'