Stats file weekly update #169
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Result: updated file data/stats_weekly_data.yml | |
| # Will appear in learn.arm.com/stats | |
| name: Stats file weekly update | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '00 1 * * 1' # At 01:00 on Mondays. | |
| jobs: | |
| update_stats: | |
| if: github.repository == 'ArmDeveloperEcosystem/arm-learning-paths' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out current repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: pip install pyyaml requests | |
| - name: Run stats generation script | |
| run: python3 tools/stats_data_generate.py --token ${{ secrets.GITHUB_TOKEN }} | |
| - name: Fetch content_over_time.png from roadmap repo | |
| run: | | |
| curl -sL -o content/stats/content_over_time.png \ | |
| "https://raw.githubusercontent.com/ArmDeveloperEcosystem/roadmap/main/reports/content-count/content_over_time.png" | |
| - name: Setup git config | |
| run: | | |
| git config user.name "GitHub Actions Stats Bot" | |
| git config user.email "<>" | |
| - name: Commit updated stats files | |
| run: | | |
| git add data/stats_weekly_data.yml content/stats/content_over_time.png | |
| git commit -m 'automatic update of stats files' && git push origin main || echo "No changes to commit" |