Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 11 additions & 36 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,19 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install ShellCheck
- name: Install validation tools
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
sudo apt-get install -y jq shellcheck

- name: Validate shell syntax
run: bash -n install_media.sh update_stack.sh sync_transmission_port.sh
- name: Validate shell and Compose invariants
run: bash tests/validate.sh

- name: Run ShellCheck
run: shellcheck --severity=error install_media.sh update_stack.sh sync_transmission_port.sh

- name: Extract generated Compose configuration
run: |
python3 - <<'PY'
from pathlib import Path

source = Path("install_media.sh").read_text()
marker = 'cat > "$INSTALL_DIR/docker-compose.yml" <<EOF\n'
template = source.split(marker, 1)[1].split("\nEOF\n", 1)[0]
template = template.replace(r"\${", "${")
template = template.replace('$(echo -e "$GPU_CONFIG")', "")
Path("/tmp/docker-compose.yml").write_text(template + "\n")
PY
cat > /tmp/media-stack.env <<'EOF'
PUID=1000
PGID=1000
INSTALL_DIR=/tmp/media-stack
LAN_IP=192.0.2.10
VPN_USER=test+pmp
VPN_PASS=test
PANGOLIN_ENDPOINT=https://pangolin.example.com
NEWT_ID=test
NEWT_SECRET=test
PUBLIC_DOMAIN=example.com
TZ=Europe/Warsaw
TR_USER=admin
TR_PASS=test
EOF

- name: Validate generated Compose configuration
run: docker compose --env-file /tmp/media-stack.env -f /tmp/docker-compose.yml config --quiet
run: >-
shellcheck --severity=warning
proxmox_lxc.sh
install_media.sh
media_stack.sh
update_stack.sh
sync_transmission_port.sh
470 changes: 240 additions & 230 deletions README.md

Large diffs are not rendered by default.

Loading
Loading