-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-roadmap-project-dates.yml
More file actions
54 lines (47 loc) · 1.68 KB
/
update-roadmap-project-dates.yml
File metadata and controls
54 lines (47 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Generate Monthly Learning Path Report
on:
workflow_dispatch:
inputs:
month:
description: 'Month to generate report for (YYYY-MM format)'
required: false
month_range:
description: 'Month range to generate report for (YYYY-MM YYYY-MM format)'
required: false
jobs:
generate-report:
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Create reports directory if not exists
run: mkdir -p reports
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tools/requirements.txt
- name: Generate monthly report
env:
PAT: ${{ secrets.PAT }}
run: |
if [ -n "${{ github.event.inputs.month_range }}" ]; then
RANGE=(${{ github.event.inputs.month_range }})
python tools/generate-monthly-report.py --month-range ${RANGE[0]} ${RANGE[1]}
elif [ -n "${{ github.event.inputs.month }}" ]; then
python tools/generate-monthly-report.py --month ${{ github.event.inputs.month }}
else
python tools/generate-monthly-report.py
fi
- name: Commit and push report to repository
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add reports/
git commit -m "Add monthly learning path report [skip ci]" || echo "No changes to commit"
git push
env:
GITHUB_TOKEN: ${{ secrets.PAT }}