Count Lines of Code #141
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Count Lines of Code | |
on: | |
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' | |
push_options: '--force' | |
commit_options: '--no-verify' |