From 34d0fe0b495fc54785b9f5facec5b9ee51f522cf Mon Sep 17 00:00:00 2001 From: dutta-alankar Date: Sun, 28 Apr 2024 09:08:04 +0200 Subject: [PATCH] [ENH] Added lines of code GitHub Action --- .github/workflows/lines_of_code.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/lines_of_code.yml diff --git a/.github/workflows/lines_of_code.yml b/.github/workflows/lines_of_code.yml new file mode 100644 index 0000000..6bc6f2b --- /dev/null +++ b/.github/workflows/lines_of_code.yml @@ -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