Weekly QuantEcon Report #26
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
| name: Weekly QuantEcon Report | |
| on: | |
| schedule: | |
| # Run every Saturday at 9:00 AM UTC | |
| - cron: '0 9 * * 6' | |
| workflow_dispatch: | |
| # Allow manual triggering | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| generate-report: | |
| runs-on: ubuntu-latest | |
| name: Generate Weekly Report | |
| steps: | |
| - name: Generate weekly report | |
| id: report | |
| uses: QuantEcon/action-weekly-report@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| organization: 'QuantEcon' | |
| output-format: 'markdown' | |
| exclude-repos: 'lecture-.*\.notebooks,test-.*' | |
| track-external-repos: 'executablebooks/sphinx-exercise,executablebooks/sphinx-proof' | |
| - name: Create issue with report | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| // Read the report content directly from the generated file | |
| let reportContent = ''; | |
| try { | |
| reportContent = fs.readFileSync('weekly-report.md', 'utf8'); | |
| console.log(`Successfully read report file, length: ${reportContent.length}`); | |
| } catch (error) { | |
| console.error('Failed to read weekly-report.md:', error); | |
| reportContent = 'Error: Unable to load weekly report content.'; | |
| } | |
| // Create issue title with current date | |
| const now = new Date(); | |
| const weekEnding = now.toLocaleDateString('en-US', { | |
| year: 'numeric', | |
| month: 'long', | |
| day: 'numeric' | |
| }); | |
| const title = `Weekly Report - Week Ending ${weekEnding}`; | |
| // Create the issue | |
| await github.rest.issues.create({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| title: title, | |
| body: reportContent, | |
| labels: ['weekly-report', 'automated'] | |
| }); | |
| console.log(`Created issue: ${title}`); | |
| console.log(`Report content length: ${reportContent.length}`); | |
| - name: Upload report as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: weekly-report | |
| path: weekly-report.md | |
| retention-days: 90 |