Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add cloc.yml #104

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/cloc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Aggiorna statistiche cloc al merge di una PR

on:
push:
branches: [ main ]
jobs:
cloc:
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:
- name: Checkout del codice
uses: actions/checkout@v3

- name: Installa cloc
run: |
sudo apt-get update
sudo apt-get install cloc

- name: Calcola linee di codice
run: |
cloc src --csv --out=lines_of_code.csv --hide-rate
cloc src --out=lines_of_code.txt --hide-rate

- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Update line count"
file_pattern: "lines_of_code.*"
Loading