Files
Tools/.gitea/workflows/generate-readme.yml
2025-12-02 23:19:42 -05:00

51 lines
1.2 KiB
YAML

name: Generate README
on:
push:
branches:
- main
- '**'
paths:
- '**/*.sh'
- '**/*.bat'
- 'scripts/generate_readme.sh'
- '.gitea/workflows/generate-readme.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Git remote
run: |
git remote set-url origin https://git.hudsonriggs.systems/HRiggs/tools.git
- name: Generate README
run: |
bash scripts/generate_readme.sh
- name: Commit changes
run: |
if git diff --quiet README.md; then
echo "No README changes"
exit 0
fi
git config user.name "gitea-bot"
git config user.email "gitea-bot@users.noreply.local"
git add README.md
git commit -m "docs: auto-generate README for scripts [skip ci]"
- name: Push changes
env:
BRANCH_NAME: ${{ github.ref_name }}
run: |
: "Pushing to branch ${BRANCH_NAME} via HTTPS"
git push origin HEAD:"${BRANCH_NAME}"