Skip to content

Commit 3d8152a

Browse files
Merge branch 'pipeline'
2 parents 2658245 + 99d7b3f commit 3d8152a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+60907
-11039
lines changed

.github/workflows/container-build.yaml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- cron: "15 3 * * *" # sadly there is no TZ support here
77
push:
88
branches:
9-
- "*"
9+
- "main"
1010

1111
permissions:
1212
contents: read
@@ -24,15 +24,26 @@ jobs:
2424
uses: actions/checkout@v5
2525
- name: Build container
2626
run: |
27-
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
28-
# ugly workaround for converting content of $GITHUB_REPOSITORY (= `MagicMirrorOrg/MagicMirror-3rd-Party-Modules`)
29-
REPO="$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')"
30-
# regular build
31-
PARAMS="--output type=image,\"name=ghcr.io/${REPO}:${{ github.ref_name }}\",push=true"
32-
else
33-
# only build without pushing the image; still pull the full wiki dataset
34-
PARAMS="--output type=image,push=false"
35-
fi
27+
# ghcr requires lowercase repository names; normalize `MagicMirrorOrg/MagicMirror-3rd-Party-Modules`
28+
REPO="$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')"
29+
case "${{ github.event_name }}" in
30+
workflow_dispatch)
31+
# manual runs should publish a refreshed image tag
32+
PARAMS="--output type=image,\"name=ghcr.io/${REPO}:${{ github.ref_name }}\",push=true"
33+
;;
34+
schedule)
35+
# nightly cron refresh publishes the image used by the website
36+
PARAMS="--output type=image,\"name=ghcr.io/${REPO}:${{ github.ref_name }}\",push=true"
37+
;;
38+
push)
39+
# changes on main publish the branch tag
40+
PARAMS="--output type=image,\"name=ghcr.io/${REPO}:${{ github.ref_name }}\",push=true"
41+
;;
42+
*)
43+
# fallback: build without pushing, but still run full build pipeline
44+
PARAMS="--output type=image,push=false"
45+
;;
46+
esac
3647
# registry credentials
3748
export DOCKER_CONFIG="$(pwd)/container"
3849
echo "{\"auths\":{\"ghcr.io\":{\"auth\":\"$(echo -n ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} | base64 -w 0)\"}}}" > $DOCKER_CONFIG/config.json

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/modules_/*
44
/modules_temp/*
55
/node_modules/*
6-
/scripts/__pycache__/*
76
.eslintcache
87
.idea
98
.vscode/*

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.js
2+
*.ts
23
website/data/*.json
34
fixtures/baseline/
45
fixtures/data/

.pylintrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

container/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
FROM nikolaik/python-nodejs:latest AS builder
1+
FROM node:24-slim AS builder
2+
3+
RUN apt-get update \
4+
&& apt-get install -y --no-install-recommends git ca-certificates \
5+
&& rm -rf /var/lib/apt/lists/*
26

37
WORKDIR /workspace
48

@@ -10,7 +14,6 @@ set -e
1014
git config --global --add safe.directory /workspace
1115
git log -1
1216
export GITHUB_TOKEN="${GITHUB_TOKEN}"
13-
pip install requests
1417
npm clean-install
1518
node --run all
1619
EOF

cspell.config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"bergfex",
1212
"bugsounet",
1313
"checkjs",
14-
"checkpy",
14+
"checkts",
1515
"codeberg",
1616
"Cutover",
1717
"diffing",
@@ -36,7 +36,6 @@
3636
"omxplayer",
3737
"openweathermap",
3838
"ptrbld",
39-
"PYTHONPATH",
4039
"ratp",
4140
"refspecs",
4241
"rollup",

dist/schemas/modules.stage.4.schema.json

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,121 @@
102102
"type": "string"
103103
}
104104
}
105+
},
106+
{
107+
"$schema": "http://json-schema.org/draft-07/schema#",
108+
"title": "Module Package Manifest",
109+
"type": "object",
110+
"properties": {
111+
"packageJson": {
112+
"type": "object",
113+
"required": ["status"],
114+
"properties": {
115+
"status": {
116+
"type": "string",
117+
"enum": ["parsed", "missing", "error"]
118+
},
119+
"path": {
120+
"type": "string",
121+
"minLength": 1
122+
},
123+
"raw": {
124+
"type": "string"
125+
},
126+
"summary": {
127+
"type": "object",
128+
"properties": {
129+
"name": {
130+
"type": "string"
131+
},
132+
"version": {
133+
"type": "string"
134+
},
135+
"description": {
136+
"type": "string"
137+
},
138+
"license": {
139+
"type": "string"
140+
},
141+
"type": {
142+
"type": "string"
143+
},
144+
"keywords": {
145+
"type": "array",
146+
"items": {
147+
"type": "string"
148+
}
149+
},
150+
"scripts": {
151+
"type": "object",
152+
"patternProperties": {
153+
".*": {
154+
"type": "string"
155+
}
156+
},
157+
"additionalProperties": false
158+
},
159+
"dependencies": {
160+
"type": "object",
161+
"patternProperties": {
162+
".*": {
163+
"type": "string"
164+
}
165+
},
166+
"additionalProperties": false
167+
},
168+
"devDependencies": {
169+
"type": "object",
170+
"patternProperties": {
171+
".*": {
172+
"type": "string"
173+
}
174+
},
175+
"additionalProperties": false
176+
},
177+
"peerDependencies": {
178+
"type": "object",
179+
"patternProperties": {
180+
".*": {
181+
"type": "string"
182+
}
183+
},
184+
"additionalProperties": false
185+
},
186+
"optionalDependencies": {
187+
"type": "object",
188+
"patternProperties": {
189+
".*": {
190+
"type": "string"
191+
}
192+
},
193+
"additionalProperties": false
194+
},
195+
"engines": {
196+
"type": "object",
197+
"patternProperties": {
198+
".*": {
199+
"type": "string"
200+
}
201+
},
202+
"additionalProperties": false
203+
}
204+
},
205+
"additionalProperties": true
206+
},
207+
"warnings": {
208+
"type": "array",
209+
"items": {
210+
"type": "string"
211+
}
212+
},
213+
"error": {
214+
"type": "string"
215+
}
216+
},
217+
"additionalProperties": false
218+
}
219+
}
105220
}
106221
],
107222
"properties": {
@@ -171,6 +286,114 @@
171286
"type": "string",
172287
"minLength": 1
173288
}
289+
},
290+
"packageJson": {
291+
"type": "object",
292+
"required": ["status"],
293+
"properties": {
294+
"status": {
295+
"type": "string",
296+
"enum": ["parsed", "missing", "error"]
297+
},
298+
"path": {
299+
"type": "string",
300+
"minLength": 1
301+
},
302+
"raw": {
303+
"type": "string"
304+
},
305+
"summary": {
306+
"type": "object",
307+
"properties": {
308+
"name": {
309+
"type": "string"
310+
},
311+
"version": {
312+
"type": "string"
313+
},
314+
"description": {
315+
"type": "string"
316+
},
317+
"license": {
318+
"type": "string"
319+
},
320+
"type": {
321+
"type": "string"
322+
},
323+
"keywords": {
324+
"type": "array",
325+
"items": {
326+
"type": "string"
327+
}
328+
},
329+
"scripts": {
330+
"type": "object",
331+
"patternProperties": {
332+
".*": {
333+
"type": "string"
334+
}
335+
},
336+
"additionalProperties": false
337+
},
338+
"dependencies": {
339+
"type": "object",
340+
"patternProperties": {
341+
".*": {
342+
"type": "string"
343+
}
344+
},
345+
"additionalProperties": false
346+
},
347+
"devDependencies": {
348+
"type": "object",
349+
"patternProperties": {
350+
".*": {
351+
"type": "string"
352+
}
353+
},
354+
"additionalProperties": false
355+
},
356+
"peerDependencies": {
357+
"type": "object",
358+
"patternProperties": {
359+
".*": {
360+
"type": "string"
361+
}
362+
},
363+
"additionalProperties": false
364+
},
365+
"optionalDependencies": {
366+
"type": "object",
367+
"patternProperties": {
368+
".*": {
369+
"type": "string"
370+
}
371+
},
372+
"additionalProperties": false
373+
},
374+
"engines": {
375+
"type": "object",
376+
"patternProperties": {
377+
".*": {
378+
"type": "string"
379+
}
380+
},
381+
"additionalProperties": false
382+
}
383+
},
384+
"additionalProperties": true
385+
},
386+
"warnings": {
387+
"type": "array",
388+
"items": {
389+
"type": "string"
390+
}
391+
},
392+
"error": {
393+
"type": "string"
394+
}
395+
},
396+
"additionalProperties": false
174397
}
175398
},
176399
"additionalProperties": false

0 commit comments

Comments
 (0)