1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-02 16:43:12 +00:00

Revert "feat(.github/workflows/loc.yml): add new GitHub action to calculate and publish lines of code report"

This reverts commit 857d8115db.
This commit is contained in:
kzndotsh 2024-08-25 02:09:46 -04:00
parent 84fc117a03
commit d1bd866ea5
2 changed files with 0 additions and 67 deletions

View file

@ -1,63 +0,0 @@
name: Calculate and Publish Lines of Code Report
on:
push:
branches:
- main
release:
types: [published]
jobs:
loc-report:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
# Debugging step to print the current directory and its contents
- name: Print workspace info for debugging purposes
run: |
echo "Workspace directory: ${{ github.workspace }}"
ls -alR ${{ github.workspace }}
- name: Calculate Lines of Code
id: loc
uses: PavanMudigonda/lines-of-code-reporter@v1.6
with:
directory: "${{ github.workspace }}/tux,${{ github.workspace }}/docs,${{ github.workspace }}/prisma" # Directories to include
github_token: ${{ secrets.GITHUB_TOKEN }} # GitHub Token
exclude_dir: "${{ github.workspace }}/assets" # Exclude assets directory
- name: Print Lines of Code Output
shell: pwsh
run: |
Write-Host 'Total Lines of Code...: ${{ steps.loc.outputs.total_lines_string }}'
Write-Host 'Lines of Code Markdown Report Path...: ${{ steps.loc.outputs.loc_report }}'
- name: Add Lines of Code Summary
run: echo "${{ steps.loc.outputs.lines-of-code-summary }}" >> $GITHUB_STEP_SUMMARY
- name: Update README with LOC
id: update-readme
run: |
# Define the placeholder and new content
LOC_PLACEHOLDER="<!-- LOC-REPORT -->"
LOC_CONTENT="${{ steps.loc.outputs.lines-of-code-summary }}"
# Read the current README.md and replace the placeholder with the new content
README_CONTENT=$(cat README.md)
UPDATED_README_CONTENT="${README_CONTENT//$LOC_PLACEHOLDER/$LOC_CONTENT}"
# Save the updated content back to README.md
echo "${UPDATED_README_CONTENT}" > README.md
- name: Commit changes to README
if: ${{ github.ref == 'refs/heads/main' }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add README.md
git commit -m "Update README with LOC report"
git push

View file

@ -150,7 +150,3 @@ See [LICENSE](LICENSE.md) for details.
## Metrics
![Alt](https://repobeats.axiom.co/api/embed/b988ba04401b7c68edf9def00f5132cd2a7f3735.svg "Repobeats analytics image")
## Lines of Code
<!-- LOC-REPORT -->