Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/generate-agendas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Generate Meeting Agendas

on:
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:

permissions:
contents: write

jobs:
generate-agendas:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Install dependencies
run: uv sync

- name: Write service account JSON to temp file
run: echo '${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }}' > /tmp/service_account.json

- name: Run agenda generator
env:
GOOGLE_SERVICE_ACCOUNT_JSON: /tmp/service_account.json
GOOGLE_CALENDAR_ID: ${{ secrets.GOOGLE_CALENDAR_ID }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: uv run agenda_generator.py

- name: Clean up service account file
if: always()
run: rm -f /tmp/service_account.json

- name: Check for changes and commit
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Generate meeting agendas for $(date +'%B %Y')"
git push origin main
else
echo "No new agenda files generated. Skipping commit."
fi
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*swp
*~
.DS_Store
__pycache__
.kiro/
Loading