mirror of
https://github.com/MinaSaad1/pbi-cli
synced 2026-04-21 13:37:19 +00:00
37 lines
1,000 B
YAML
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
|