fix: use README template with sed

This commit is contained in:
2026-01-20 19:48:27 -05:00
parent 6fafbd0e2d
commit e86d9e6dcb
2 changed files with 11 additions and 3 deletions

View File

@@ -14,12 +14,20 @@ 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')
export FORMATTED_LOC=$(printf "%'d" $LOC)
FORMATTED_LOC=$(printf "%'d" $LOC)
envsubst < README.template > README.md
echo "Injecting $FORMATTED_LOC into README.template..."
sed "s/REPLACE_ME_LOC/$FORMATTED_LOC/g" README.template > README.md
if [ ! -s README.md ]; then
echo "Error: README.md is empty!"
exit 1
fi
- name: Commit and Push
run: |

View File

@@ -72,7 +72,7 @@ Actively used across this environment or in adjacent projects:
## ⚡ Efficiency Metrics
- **Codebase Growth:** `${FORMATTED_LOC}` lines of custom code across all our repositories
- **Codebase Growth:** `REPLACE_ME_LOC` lines of custom code across all our repositories
- **Ares:** Ryzen 9 9950X sustaining ~0.06 load avg while running Gitea and a Kubernetes control plane
- **Resilience:** Automated failover between AWS and peer nodes