mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-09-30 13:53:12 +00:00
* feat(terraform): ship dev content CD through Terraform (SH-300) GitHub uploads immutable release prefixes; Terraform owns live publish. Push-to-dev stays off until TERRAFORM_CONTENT_CD_ENABLED is set. * fix(terraform): align release-plan guard flags and CloudFront verify IAM (SH-300)
29 lines
769 B
Python
Executable file
29 lines
769 B
Python
Executable file
#!/usr/bin/env python3
|
|
"""Read .release/current JSON from stdin and write GitHub Actions outputs."""
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
import os
|
|
import sys
|
|
|
|
|
|
def main() -> int:
|
|
raw = sys.stdin.read().strip()
|
|
data = json.loads(raw) if raw else {}
|
|
current = data.get("current") or ""
|
|
previous = data.get("previous") or ""
|
|
output_path = os.environ["GITHUB_OUTPUT"]
|
|
with open(output_path, "a", encoding="utf-8") as handle:
|
|
handle.write(f"live_current={current}\n")
|
|
handle.write(f"live_previous={previous}\n")
|
|
print(
|
|
"Pointer live current="
|
|
+ (current or "<empty>")
|
|
+ " previous="
|
|
+ (previous or "<empty>")
|
|
)
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|