# Aktualisiert täglich badge-data.json (Download-Summe, OmniNX-Version, kompatible FW = Tag des letzten Releases in OmniNX/NX_Firmware). # 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 }} FIRMWARE_REPOSITORY: OmniNX/NX_Firmware # Optional: PAT with read access if NX_Firmware is private (job token often 404s on other repos). FIRMWARE_API_TOKEN: ${{ secrets.FIRMWARE_API_TOKEN }} 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