41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
name: Update README Actions Table
|
|
|
|
on:
|
|
push:
|
|
branches: ["main", "master"]
|
|
paths:
|
|
- '**/action.yml'
|
|
- '**/action.yaml'
|
|
- 'scripts/update-readme.py'
|
|
|
|
jobs:
|
|
update-readme:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Update README table
|
|
run: |
|
|
chmod +x scripts/update-readme.py
|
|
./scripts/update-readme.py
|
|
|
|
- name: Commit and Push changes
|
|
run: |
|
|
git config --global user.name "Gitea Actions"
|
|
git config --global user.email "actions@gitea.local"
|
|
git add README.md
|
|
if ! git diff --quiet HEAD README.md; then
|
|
git commit -m "docs: auto-update README actions table [skip ci]"
|
|
git push origin HEAD:${{ github.ref_name }}
|
|
else
|
|
echo "No changes to commit"
|
|
fi
|