forked from Mirrors/OmniNX
- Add Gitea Actions workflow and update-badge-data.py to refresh download counts and version from the releases API on a schedule. - Simplify README shields (fewer dynamic badges) and move social badges to the footer; document the badge-data maintenance path. - Drop release_published_date from badge-data.json; ignore __pycache__. Made-with: Cursor
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
# Aktualisiert täglich badge-data.json (Download-Summe, Version aus letztem Release, Switch-FW aus Release-Body).
|
|
# Läuft auf Gitea Actions wie die übrigen Workflows (.github/workflows); github.api_url = Gitea-API.
|
|
|
|
name: Update badge-data
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 5 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
refresh:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
fetch-depth: 0
|
|
|
|
- name: Regenerate badge-data.json
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_API_URL: ${{ github.api_url }}
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
run: python3 scripts/update-badge-data.py
|
|
|
|
- name: Commit and push if changed
|
|
run: |
|
|
set -euo pipefail
|
|
git config user.name "OmniNX CI"
|
|
git config user.email "omninx-ci@users.noreply.git.niklascfw.de"
|
|
git add badge-data.json
|
|
if git diff --staged --quiet; then
|
|
echo "badge-data.json unverändert."
|
|
exit 0
|
|
fi
|
|
git commit -m "chore: refresh badge-data.json [skip ci]"
|
|
git push
|