Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
500Foods committed Nov 27, 2023
2 parents b51f36a + df388dc commit ae8aaed
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
28 changes: 27 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,38 @@ jobs:
cloc:
# The type of runner that the job will run on
runs-on: ubuntu-latest

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Runs djdefi/cloc-action
- name: Count Lines of Code (cloc)
uses: djdefi/cloc-action@5
uses: djdefi/cloc-action@main
with:
options: --report-file=cloc.txt

# Copy the new cloc.txt contents into the README.md file at the appropriate spot
- 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

# Save the output back to the repository
- uses: stefanzweifel/git-auto-commit-action@v4
with:
skip_dirty_check: true
branch: main
file_pattern: 'README.md'
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,21 @@ As with any modern application, other libraries/dependencies have been used in t

## Repository Information
[![Count Lines of Code](https://github.com/500Foods/TMS-XData-SurveyServerExample/actions/workflows/main.yml/badge.svg)](https://github.com/500Foods/TMS-XData-SurveyServerExample/actions/workflows/main.yml)
<!--CLOC-START -->
```
Last Updated at 2023-11-27 02:20:49 UTC
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Pascal 9 1556 3791 10609
Delphi Form 3 1 0 123
YAML 2 4 8 15
Markdown 1 3 0 10
Pascal 9 1560 3791 10641
Delphi Form 3 1 0 134
YAML 2 8 12 33
Markdown 1 6 2 30
-------------------------------------------------------------------------------
SUM: 15 1564 3799 10757
SUM: 15 1575 3805 10838
-------------------------------------------------------------------------------
```
<!--CLOC-END-->

## Sponsor / Donate / Support
If you find this work interesting, helpful, or valuable, or that it has saved you time, money, or both, please consider directly supporting these efforts financially via [GitHub Sponsors](https://github.com/sponsors/500Foods) or donating via [Buy Me a Pizza](https://www.buymeacoffee.com/andrewsimard500). Also, check out these other [GitHub Repositories](https://github.com/500Foods?tab=repositories&q=&sort=stargazers) that may interest you.

0 comments on commit ae8aaed

Please sign in to comment.