mirror of
https://github.com/rajnandan1/kener.git
synced 2026-04-26 04:48:28 -05:00
37a667daff
🔄 Automate README Generation via Mustache Templating
- Use Mustache to dynamically generate `README.md` from `README.template.md`.
- Populate README with environment variables (e.g., `KENER_BUILD_FULL_VERSION`).
- Prevent direct edits to `README.md` by enforcing updates via the template.
- Enhance GitHub Actions workflow to auto-generate and commit the README.
- Add GitHub Action workflow (`protect-readme.yml`) to prevent others from direct updates to `README.md` via PR.
22 lines
515 B
YAML
22 lines
515 B
YAML
name: Prevent Direct README Changes
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "README.md"
|
|
|
|
jobs:
|
|
check-readme:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4.4.2
|
|
|
|
- name: Detect direct README changes
|
|
run: |
|
|
if git diff --name-only origin/main | grep -q "README.md"; then
|
|
echo "❌ Direct modifications to README.md are not allowed!"
|
|
echo "Please update README.md.template instead."
|
|
exit 1
|
|
fi
|