-
-
Notifications
You must be signed in to change notification settings - Fork 231
44 lines (41 loc) · 1.94 KB
/
validate.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
name: Validate
on: [push, pull_request]
jobs:
validate-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Validate Documentation
run: |
for APPFOLDER in compose/.apps/*; do
APPNAME=$(basename "${APPFOLDER}")
APPDEPRECATED=$(grep --color=never -Po "\scom\.dockstarter\.appinfo\.deprecated: \K.*" "compose/.apps/${APPNAME}/${APPNAME}.labels.yml" | sed -E 's/^([^"].*[^"])$/"\1"/' | xargs || echo false)
if [[ ${APPDEPRECATED} == true ]]; then
continue
fi
if [[ ! -f "docs/apps/${APPNAME}.md" ]]; then
echo "Missing documentation for ${APPNAME}"
exit 1
fi
if ! grep -q "apps/${APPNAME}.md" mkdocs.yml; then
echo "Missing link for ${APPNAME}"
exit 1
fi
done
validate-images:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Validate Images
run: |
for APPFOLDER in compose/.apps/*; do
APPNAME=$(basename "${APPFOLDER}")
APPDEPRECATED=$(grep --color=never -Po "\scom\.dockstarter\.appinfo\.deprecated: \K.*" "compose/.apps/${APPNAME}/${APPNAME}.labels.yml" | sed -E 's/^([^"].*[^"])$/"\1"/' | xargs || echo false)
if [[ ${APPDEPRECATED} == true ]]; then
continue
fi
APPIMAGE=$(grep --color=never -Po "\simage: \K.*" "compose/.apps/${APPNAME}/${APPNAME}.x86_64.yml" | sed -E 's/([^:]+):[^:]+/\1/' | xargs || echo false)
APPTAG=$(grep --color=never -Po "\scom\.dockstarter\.appvars\.${APPNAME}_tag: \K.*" "compose/.apps/${APPNAME}/${APPNAME}.labels.yml" | sed -E 's/^([^"].*[^"])$/"\1"/' | xargs || echo false)
echo "Image: ${APPIMAGE}:${APPTAG}"
docker run --rm mplatform/mquery "${APPIMAGE}:${APPTAG}"
done