Notebook CI - Scheduled Report #2
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
| # Generates a comparison report between the latest "Notebook CI - Scheduled" | |
| # run and the one from ~7 days prior. | |
| # Runs automatically each Sunday at 4 AM UTC (after the CI run at 2 AM UTC) | |
| # and can also be triggered manually. | |
| name: Notebook CI - Scheduled Report | |
| on: | |
| schedule: | |
| # Every Sunday at 4 AM UTC (2 hours after the scheduled CI at 2 AM UTC) | |
| - cron: '0 4 * * 0' | |
| workflow_dispatch: | |
| jobs: | |
| generate-report: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: pip install requests | |
| - name: Generate comparison report | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| run: | | |
| python .github/scripts/scheduled_ci_report.py report.md | |
| - name: Write report to workflow summary | |
| run: cat report.md >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upload report as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: scheduled-ci-report | |
| path: report.md | |
| retention-days: 90 |