Skip to content

Commit 986b60d

Browse files
Run auto download daily for specific manufacturers (#708)
1 parent a8800d9 commit 986b60d

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Run daily auto download
2+
on:
3+
schedule:
4+
- cron: '0 12 * * *'
5+
6+
env:
7+
# comma separate values, no spaces
8+
MANUFACTURERS_TO_PROCESS: "inovelli"
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
run-autodl:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: pnpm/action-setup@v4
20+
with:
21+
version: 9
22+
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
registry-url: https://registry.npmjs.org/
27+
cache: pnpm
28+
29+
- name: Install dependencies
30+
run: pnpm i --frozen-lockfile
31+
32+
- name: Build
33+
run: pnpm run build
34+
35+
- name: Run Autodl
36+
uses: actions/github-script@v7
37+
env:
38+
NODE_EXTRA_CA_CERTS: cacerts.pem
39+
with:
40+
script: |
41+
const {runAutodl} = await import("${{ github.workspace }}/dist/ghw_run_autodl.js")
42+
43+
await runAutodl(github, core, context, "$MANUFACTURERS_TO_PROCESS")
44+
45+
- name: Commit changes
46+
run: |
47+
git config --global user.name 'github-actions[bot]'
48+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
49+
git add .
50+
git commit -m "Daily autodl update" || echo 'Nothing to commit'
51+
git push

0 commit comments

Comments
 (0)