Skip to content

Commit

Permalink
[ENH] Added lines of code GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
dutta-alankar committed Apr 28, 2024
1 parent ea3dfc6 commit 34d0fe0
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/lines_of_code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on: [push]
name: Count lines of code

jobs:
hello_world_job:
runs-on: ubuntu-latest
name: Count lines of code
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Launch the local action
uses: ./ # Uses an action in the root directory
id: badge
with:
debug: true
directory: ./
badge: ./misc/lines_of_code.svg
ignore: cloudy-codes/|example-scripts/|README

- name: Print the output
run: |
echo "Scanned: ${{ steps.badge.outputs.counted_files }}";
echo "Line Count: ${{ steps.badge.outputs.total_lines }}";
- name: Deploy to image-data branch
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./misc
publish_branch: badges
github_token: ${{ secrets.TOKEN_GITHUB }}
user_name: github-actions[bot]
user_email: github-actions[bot]@users.noreply.github.com

0 comments on commit 34d0fe0

Please sign in to comment.