-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (60 loc) · 3.13 KB
/
Copy pathvalidate.yml
File metadata and controls
68 lines (60 loc) · 3.13 KB
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
name: Validate
on:
push:
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate shell scripts
run: |
bash -n bootstrap.sh
while IFS= read -r -d '' f; do
bash -n "$f"
done < <(find scripts -type f -name '*.sh' -print0)
- name: Validate python scripts
run: |
while IFS= read -r -d '' f; do
python3 -m py_compile "$f"
done < <(find scripts -type f -name '*.py' -print0)
- name: Validate media path usage
run: |
# Automation scripts must resolve MEDIA_DIR from env/.env, not hardcode $HOME/Media.
! rg -n '\$HOME/Media' \
scripts/auto-heal.sh \
scripts/backup.sh \
scripts/download-watchdog.py \
scripts/install-launchd-jobs.sh \
scripts/install-vpn-failover.sh \
scripts/log-prune.sh \
scripts/setup-music.sh \
scripts/setup-cloud-storage.sh \
scripts/cloud-upload.sh \
scripts/vpn-failover-watch.sh
- name: Validate compose config
run: |
cp .env.example .env
docker compose --profile autoupdate --profile music config >/dev/null
docker compose --profile jellyfin config >/dev/null
docker compose --profile autoupdate --profile music --profile jellyfin config >/dev/null
# Cloud storage compose override
sed -i 's/^# CLOUD_STORAGE_ENABLED=true/CLOUD_STORAGE_ENABLED=true/' .env
sed -i 's/^# RCLONE_REMOTE=myremote/RCLONE_REMOTE=testremote/' .env
sed -i 's/^# RCLONE_REMOTE_PATH=/RCLONE_REMOTE_PATH=/' .env
sed -i 's/^# RCLONE_VFS_CACHE_MODE=full/RCLONE_VFS_CACHE_MODE=full/' .env
sed -i 's/^# RCLONE_VFS_CACHE_MAX_SIZE=50G/RCLONE_VFS_CACHE_MAX_SIZE=50G/' .env
sed -i 's/^# RCLONE_VFS_CACHE_MAX_AGE=72h/RCLONE_VFS_CACHE_MAX_AGE=72h/' .env
sed -i 's/^# RCLONE_VFS_READ_CHUNK_SIZE=128M/RCLONE_VFS_READ_CHUNK_SIZE=128M/' .env
docker compose -f docker-compose.yml -f docker-compose.cloud-storage.yml --profile cloud-storage config >/dev/null
docker compose -f docker-compose.yml -f docker-compose.cloud-storage.yml --profile cloud-storage --profile jellyfin config >/dev/null
docker compose -f docker-compose.yml -f docker-compose.cloud-storage.yml --profile cloud-storage --profile tdarr-docker config >/dev/null
# NAS storage compose (same overlay, different env vars)
sed -i 's/^RCLONE_VFS_CACHE_MAX_SIZE=50G/RCLONE_VFS_CACHE_MAX_SIZE=10G/' .env
echo 'STORAGE_TYPE=nas' >> .env
echo 'RCLONE_DIR_CACHE_TIME=30s' >> .env
docker compose -f docker-compose.yml -f docker-compose.cloud-storage.yml --profile cloud-storage config >/dev/null
docker compose -f docker-compose.yml -f docker-compose.cloud-storage.yml --profile cloud-storage --profile jellyfin config >/dev/null
docker compose -f docker-compose.yml -f docker-compose.cloud-storage.yml --profile cloud-storage --profile tdarr-docker config >/dev/null
rm .env