Repository navigation
Releases: MikhailEpatko/loc-badge-action
Release list
Release-4.0.0
Removed include and exclude files options.
Release-3.0.1
Fixed name
Release-3.0.0
Added new features:
- multiple exclude directories option
- multiple include directories option
- color option
- number round mode option
- decimal separator in number
Added test jobs.
Release-2.0.0
GitHub action to generate Liines-of-Code badge with lines of code count
To install action copy the workflow code into a .github/workflows/main.yml file in your repository
on: [push]
jobs:
lines_counter_job:
runs-on: ubuntu-latest
name: A job to count lines of code and generate badge
steps:
- uses: actions/checkout@v4
- id: counting
uses: ./ # write the action name instead
with:
include-files: '.*\**' # default value - include all files
exclude-files: '' # default value - exclude no files
See README.md for more regex examples.
Changes:
The badge will be generated into ./output/total-lines.svg file. Use whatever tool you prefer to upload it somewhere.
First version
In this version, you use posix-egrep to pass a regular expression to the action to exclude or include file lines counts.
In next releases it will be simplified.
To install action copy the workflow code into a .github/workflows/main.yml file in your repository
on: [push]
jobs:
lines_counter_job:
runs-on: ubuntu-latest
name: A job to count lines of code and generate badge
steps:
- uses: actions/checkout@v4
- id: counting
uses: ./ # write the action name instead
with:
include-files: '.*\.sh' # default value - include all files
exclude-files: '' # default value - exclude no files
See README.md for more regex examples.
The badge will be generated in image-data branche of your repository. For this you need to configure Setting the permissions of the GITHUB_TOKEN for your repository.