-
Notifications
You must be signed in to change notification settings - Fork 2
133 lines (104 loc) · 3.51 KB
/
update-archives.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Update Archives
on:
schedule:
- cron: "37 9 * * *"
workflow_dispatch:
jobs:
update-pdfs:
runs-on: ubuntu-latest
steps:
- name: Check out Repository
uses: actions/checkout@v3
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "modm update bot"
- name: Setup Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Python Dependencies
run: |
pip3 install .
# This cache repository is private since copyright prevents republishing!
# Nicely ask @salkinium for access to this repository.
- name: Check out STMicro PDF Archive
uses: actions/checkout@v3
with:
repository: modm-ext/archive-stmicro-pdf
path: ext/stmicro/pdf
ssh-key: ${{ secrets.SSH_KEY_STMICRO_PDF }}
persist-credentials: true
- name: Update PDF Archive
run: |
python3 -m modm_data.dl.stmicro --directory ext/stmicro/pdf --download pdf --new new_pdfs.txt
- name: Git push PDF Archive
working-directory: ext/stmicro/pdf
run: |
git add .
git commit -m "Update PDFs" || true
git gc
git count-objects -vH
git push origin main
# This cache repository is private since copyright prevents republishing!
# Nicely ask @salkinium for access to this repository.
- name: Check out STMicro HTML Archive
uses: actions/checkout@v3
with:
repository: modm-ext/archive-stmicro-html
path: ext/stmicro/html-archive
ssh-key: ${{ secrets.SSH_KEY_STMICRO_HTML }}
persist-credentials: true
- name: Update HTML Archive
run: |
cat new_pdfs.txt | xargs -I {} echo ext/stmicro/html-archive/{} | xargs make -j3
- name: Git push HTML Archive
working-directory: ext/stmicro/html-archive
run: |
git add .
git commit -m "Update HTMLs" || true
git gc
git count-objects -vH
git push origin main
- name: Upload HTML logs
if: always()
uses: actions/upload-artifact@v3
with:
name: update-html
path: log
update-cubemx:
runs-on: ubuntu-latest
steps:
- name: Check out Repository
uses: actions/checkout@v3
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "modm update bot"
- name: Setup Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Python Dependencies
run: |
pip3 install .
# This cache repository is private since copyright prevents republishing!
# Nicely ask @salkinium for access to this repository.
- name: Check out STMicro CubeMX Archive
uses: actions/checkout@v3
with:
repository: modm-ext/archive-stmicro-cubemx
path: ext/stmicro/cubemx
ssh-key: ${{ secrets.SSH_KEY_STMICRO_CUBEMX }}
persist-credentials: true
- name: Update CubeMX Archive
run: |
make download-stmicro-cubemx
- name: Git push CubeMX Archive
working-directory: ext/stmicro/cubemx
run: |
git add .
git commit -m "Update CubeMX" || true
git gc
git count-objects -vH
git push origin main