diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..779031e --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,99 @@ +name: Validate + +on: + push: + branches: [main] + pull_request: + schedule: + - cron: "14 6 * * 1" + workflow_dispatch: + +jobs: + xml: + name: XML structure + if: github.event_name == 'pull_request' || github.event_name == 'push' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Well-formedness and required fields + run: | + python3 - <<'EOF' + import sys + import xml.etree.ElementTree as ET + from pathlib import Path + + REQUIRED = ['Name', 'Repository', 'Registry', 'Support', 'Project', + 'Overview', 'Category', 'WebUI', 'TemplateURL', 'Icon'] + failed = False + + profile = ET.parse('ca_profile.xml').getroot() + if not (profile.findtext('Profile') or '').strip(): + print('ca_profile.xml: is empty') + failed = True + + for path in sorted(Path('templates').glob('*.xml')): + root = ET.parse(path).getroot() + if root.tag != 'Container' or root.get('version') != '2': + print(f'{path}: root must be ') + failed = True + for tag in REQUIRED: + if not (root.findtext(tag) or '').strip(): + print(f'{path}: missing or empty <{tag}>') + failed = True + for cfg in root.findall('Config'): + for attr in ('Name', 'Target', 'Type'): + if not cfg.get(attr): + print(f'{path}: missing {attr} attribute') + failed = True + print(f'{path}: OK' if not failed else f'{path}: FAILED') + sys.exit(1 if failed else 0) + EOF + + date-bump: + name: Date bumped on template change + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Require change when a template changes + run: | + base="origin/${{ github.base_ref }}" + changed=$(git diff --name-only "$base"...HEAD -- templates/ || true) + [ -z "$changed" ] && { echo 'No template changes.'; exit 0; } + today=$(date -u +%F) + if git diff "$base"...HEAD -- templates/ | grep -q '^+.*'; then + echo ' was updated.' + elif grep -q "$today" $changed; then + echo " already set to today ($today)." + else + echo 'Templates changed but not bumped. Set to today (YYYY-MM-DD).' + exit 1 + fi + + links: + name: Links and image + if: github.event_name != 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: All referenced URLs resolve + run: | + urls=$(grep -hoE 'https://[^<>" )]+' ca_profile.xml templates/*.xml README.md | sort -u) + fail=0 + for u in $urls; do + code=$(curl -sL -o /dev/null -w '%{http_code}' --max-time 30 \ + -A 'Mozilla/5.0 (compatible; maintainerr-template-ci)' "$u" || echo 000) + if [ "$code" -ge 400 ] || [ "$code" = 000 ]; then + echo "BROKEN ($code): $u"; fail=1 + else + echo "ok ($code): $u" + fi + done + exit $fail + - name: Image tags exist on GHCR + run: | + docker manifest inspect ghcr.io/maintainerr/maintainerr:latest > /dev/null + docker manifest inspect ghcr.io/maintainerr/maintainerr:development > /dev/null + echo 'latest and development tags resolve.' diff --git a/README.md b/README.md index 52f39eb..9a5df03 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Official [Unraid Community Applications](https://unraid.net/community/apps) templates, maintained by the [Maintainerr](https://github.com/Maintainerr/Maintainerr) team. +This repository only hosts the Unraid templates. For everything about Maintainerr itself - features, full documentation, and other install methods - see the [main repository README](https://github.com/Maintainerr/Maintainerr#readme). + ## Apps | App | Template | Image | diff --git a/screenshots/calendar.png b/screenshots/calendar.png new file mode 100644 index 0000000..cafdecd Binary files /dev/null and b/screenshots/calendar.png differ diff --git a/screenshots/collections.png b/screenshots/collections.png new file mode 100644 index 0000000..c41d121 Binary files /dev/null and b/screenshots/collections.png differ diff --git a/screenshots/overlays.png b/screenshots/overlays.png new file mode 100644 index 0000000..1e52806 Binary files /dev/null and b/screenshots/overlays.png differ diff --git a/screenshots/rule-config.png b/screenshots/rule-config.png new file mode 100644 index 0000000..57c4f9a Binary files /dev/null and b/screenshots/rule-config.png differ diff --git a/screenshots/rules.png b/screenshots/rules.png new file mode 100644 index 0000000..5a176c9 Binary files /dev/null and b/screenshots/rules.png differ diff --git a/screenshots/storage-metrics.png b/screenshots/storage-metrics.png new file mode 100644 index 0000000..aa41440 Binary files /dev/null and b/screenshots/storage-metrics.png differ diff --git a/templates/maintainerr.xml b/templates/maintainerr.xml index 096e6dd..dc9af49 100644 --- a/templates/maintainerr.xml +++ b/templates/maintainerr.xml @@ -7,6 +7,12 @@ sh false https://raw.githubusercontent.com/Maintainerr/unraid-templates/main/logo.png + https://raw.githubusercontent.com/Maintainerr/unraid-templates/main/screenshots/rules.png + https://raw.githubusercontent.com/Maintainerr/unraid-templates/main/screenshots/collections.png + https://raw.githubusercontent.com/Maintainerr/unraid-templates/main/screenshots/rule-config.png + https://raw.githubusercontent.com/Maintainerr/unraid-templates/main/screenshots/overlays.png + https://raw.githubusercontent.com/Maintainerr/unraid-templates/main/screenshots/calendar.png + https://raw.githubusercontent.com/Maintainerr/unraid-templates/main/screenshots/storage-metrics.png http://[IP]:[PORT:6246] Maintainerr is the janitor your media server doesn't have. @@ -16,7 +22,7 @@ Maintainerr does the deciding for you. Write rules for the stuff that's just tak https://github.com/Maintainerr/Maintainerr/issues https://github.com/Maintainerr/Maintainerr https://raw.githubusercontent.com/Maintainerr/unraid-templates/main/templates/maintainerr.xml - https://raw.githubusercontent.com/Maintainerr/unraid-templates/main/README.md + https://raw.githubusercontent.com/Maintainerr/Maintainerr/main/README.md https://discord.maintainerr.info MediaApp:Video MediaApp:Other plex jellyfin emby radarr sonarr seerr tautulli library cleanup media manager