Daily Briefing #127
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: Daily Briefing | |
| on: | |
| schedule: | |
| - cron: '0 7 * * *' # Runs daily at 7 AM UTC | |
| workflow_dispatch: # Allows manual trigger from GitHub | |
| permissions: | |
| contents: write | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Generate daily briefing | |
| env: | |
| CLAUDE_API_KEY: ${{ secrets.CLAUDE_API_KEY }} | |
| run: python src/main.py | |
| - name: Commit and push briefing | |
| run: | | |
| git config user.name "GitHub Actions" | |
| git config user.email "actions@github.com" | |
| git add "Daily Briefings/" | |
| git diff --staged --quiet || git commit -m "Daily briefing for $(date +%Y-%m-%d)" | |
| git push |