fix: use README template with sed
This commit is contained in:
@@ -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: |
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user