pbi-cli/.github/workflows/downloads-chart.yml

37 lines
1,000 B
YAML

name: Update downloads chart
on:
schedule:
# Daily at 06:15 UTC (after pypistats has processed the prior day)
- cron: "15 6 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
regenerate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
token: ${{ secrets.PAT }}
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Regenerate cumulative downloads chart
run: python scripts/generate_downloads_chart.py
- name: Commit and push updated chart
run: |
if git diff --quiet assets/downloads-chart.svg; then
echo "No changes to downloads chart."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add assets/downloads-chart.svg
git commit -m "chore: refresh downloads chart"
git push