Merge branch 'main' of git.ocert.at:ocertat/profile-stats

This commit is contained in:
Mark Eaton committed 2026-10-29 21:38:59 -04:00
commit 39258c5cfa
2 files changed
+28 -3

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
name: Update Language Stats
on:
schedule:
- cron: "0 6 * * *" # every day at 06:00
workflow_dispatch: # allow manual runs from the Actions tab
jobs:
lang-stats:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- name: Update .profile README
env:
# Secret names can't start with GITEA_, so the token is stored
# as PROFILE_STATS_TOKEN and mapped to what the script expects.
GITEA_BASE_URL: ${{ gitea.server_url }}
GITEA_USERNAME: ${{ gitea.repository_owner }}
GITEA_TOKEN: ${{ secrets.PROFILE_STATS_TOKEN }}
run: uv run scripts/language_stats.py
+5 -3
View File
@@ -295,9 +295,11 @@ def main() -> int:
# Fetch current README, update it, and push
readme_content, readme_sha = fetch_readme(session)
updated_readme = replace_between_markers(readme_content, markdown)
update_readme(session, updated_readme, readme_sha)
print("README.md updated successfully.", file=sys.stderr)
if updated_readme == readme_content:
print("Language stats unchanged. Skipping README update.", file=sys.stderr)
else:
update_readme(session, updated_readme, readme_sha)
print("README.md updated successfully.", file=sys.stderr)
# Save current state for next run
new_state = {"repo_timestamps": current_timestamps}