-
-
Notifications
You must be signed in to change notification settings - Fork 4
70 lines (63 loc) · 2.17 KB
/
python-app.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build Repo Reports
on:
workflow_dispatch:
schedule:
# Runs at 00:00 on the first day of each month
- cron: "0 0 1 * *"
jobs:
generate_reports:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
repo_data:
- {
input_file: "backend_framework_urls.txt",
output_file: "backend_framework_report.json",
}
- { input_file: "comp_urls.txt", output_file: "comp_report.json" }
- {
input_file: "mobile_desktop_urls.txt",
output_file: "mobile_desktop_report.json",
}
- {
input_file: "state_management_urls.txt",
output_file: "state_management_report.json",
}
- {
input_file: "ui_framework_urls.txt",
output_file: "ui_framework_report.json",
}
- { input_file: "chart_urls.txt", output_file: "chart_report.json" }
- { input_file: "db_urls.txt", output_file: "db_report.json" }
- {
input_file: "monitoring_urls.txt",
output_file: "monitoring_report.json",
}
- { input_file: "test_urls.txt", output_file: "test_report.json" }
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
working-directory: api
- name: Update Report
run: |-
python repo_report.py "${{ matrix.repo_data.input_file }}" "${{ matrix.repo_data.output_file }}"
working-directory: api
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Commit and push if changed
run: |-
git diff
git config --global user.email "readme-bot@example.com"
git config --global user.name "README-bot"
git add -A
git commit -m "Updated ${{ matrix.repo_data.output_file }}" || exit 0
git pull --rebase origin main
git push