fix: revert to sed, cleaner workflow
This commit is contained in:
@@ -14,6 +14,24 @@ jobs:
|
||||
git clone http://gitea-http:3000/${{ github.repository }}.git .
|
||||
git checkout ${{ github.ref_name }}
|
||||
|
||||
- name: Update README
|
||||
run: |
|
||||
LOC=$(grep '"total_code"' public/code-stats.json | sed 's/[^0-9]*//g')
|
||||
FORMATTED_LOC=$(printf "%'d" $LOC)
|
||||
|
||||
grep -v "Codebase Growth" README.md > README.tmp
|
||||
|
||||
sed -i "/## ⚡ Efficiency Metrics/a \\
|
||||
\\
|
||||
- **Codebase Growth:** $FORMATTED_LOC lines of custom code across all our repositories" README.tmp
|
||||
|
||||
if [ -s README.tmp ]; then
|
||||
mv README.tmp README.md
|
||||
else
|
||||
echo "Corruption detected, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Update README
|
||||
run: |
|
||||
LOC=$(grep '"total_code"' public/code-stats.json | sed 's/[^0-9]*//g')
|
||||
|
||||
Reference in New Issue
Block a user