Skip to content

Commit b6fc5b6

Browse files
Merge pull request #1885 from jasonrandrews/new-content
Python script to generate monthly reports
2 parents 59f4931 + 639f164 commit b6fc5b6

File tree

3 files changed

+403
-0
lines changed

3 files changed

+403
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Generate Monthly Learning Path Report
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
generate-report:
8+
runs-on: ubuntu-24.04-arm
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v4
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.11'
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install -r tools/requirements.txt
22+
23+
- name: Generate monthly report
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: |
27+
python tools/generate_monthly_report.py
28+
29+
- name: Create data directory if not exists
30+
run: mkdir -p data/reports
31+
32+
- name: Move report to data directory
33+
run: |
34+
REPORT_FILE=$(ls LP-report-*.md | head -n 1)
35+
mv "$REPORT_FILE" data/reports
36+
37+
- name: Commit and push report to repository
38+
run: |
39+
git config user.name github-actions
40+
git config user.email [email protected]
41+
git add data/reports/
42+
git commit -m "Add monthly learning path report [skip ci]" || echo "No changes to commit"
43+
git push
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)