Skip to content

Weekly Progress Report #29

Weekly Progress Report

Weekly Progress Report #29

Workflow file for this run

name: Weekly Progress Report
on:
schedule:
# Runs every Friday at 00:00 UTC (midnight)
- cron: '0 0 * * 5'
workflow_dispatch:
inputs:
week_number:
description: 'Week number (1-53, leave empty for current week)'
required: false
type: string
year:
description: 'Year (leave empty for current year)'
required: false
type: string
permissions:
contents: write
jobs:
generate-report:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT_TOKEN }}
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install requests==2.31.0 reportlab==4.0.7 python-dotenv==1.0.0 google-generativeai==0.8.3 PyPDF2==3.0.1
- name: Generate Weekly Report
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
ORG_NAME: ${{ github.repository_owner }}
WEEK_NUMBER: ${{ inputs.week_number }}
YEAR: ${{ inputs.year }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} # Optional: for AI insights
run: python .github/scripts/generate_report.py
- name: Commit and Push Report
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add reports/
# Determine week for commit message
if [ -n "${{ inputs.week_number }}" ]; then
WEEK="${{ inputs.week_number }}"
YEAR="${{ inputs.year }}"
[ -z "$YEAR" ] && YEAR=$(date +%Y)
else
WEEK=$(date +%V)
YEAR=$(date +%Y)
fi
# Check if there are changes to commit
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "📊 Weekly Progress Report - Week $WEEK $YEAR"
git push
echo "✅ Report committed and pushed successfully"
fi