8cc34552c6
Removes type: docker handling from action.yaml, scripts (build/deploy/utils/setup), and templates (deployment.yaml.j2, service-docker.yaml.j2). Renamed service-static.yaml.j2 -> service.yaml.j2. If site.yaml has type: docker, parse_site_yaml() now dies with a clear message pointing to action/image-build + action/image-push + action/image-deploy with hand-authored apps-repo manifests. rainsounds.vino.network was the only docker consumer and has already migrated. Drops registry-password input from action.yaml (no longer needed).
42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
"""Ensure required CLI tools are installed."""
|
|
|
|
import os
|
|
import shutil
|
|
import subprocess
|
|
import sys
|
|
|
|
|
|
def ensure_aws():
|
|
if shutil.which("aws"):
|
|
subprocess.run(["aws", "--version"], check=True)
|
|
return
|
|
print("Installing awscli...")
|
|
subprocess.run(
|
|
[sys.executable, "-m", "pip", "install", "--quiet", "--break-system-packages", "awscli"],
|
|
check=False,
|
|
)
|
|
local_bin = os.path.expanduser("~/.local/bin")
|
|
os.environ["PATH"] = f"{local_bin}:{os.environ['PATH']}"
|
|
github_path = os.environ.get("GITHUB_PATH")
|
|
if github_path:
|
|
with open(github_path, "a") as f:
|
|
f.write(f"{local_bin}\n")
|
|
subprocess.run(["aws", "--version"], check=True)
|
|
|
|
|
|
def ensure_jinja2():
|
|
try:
|
|
import jinja2
|
|
except ImportError:
|
|
print("Installing jinja2 + pyyaml...")
|
|
subprocess.run(
|
|
[sys.executable, "-m", "pip", "install", "--quiet", "--break-system-packages", "jinja2", "pyyaml"],
|
|
check=True,
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
ensure_jinja2()
|
|
ensure_aws()
|
|
print("Setup complete")
|