update
Some checks failed
Backend EC - Modal Deployment / build-and-push (push) Failing after 47s
Backend EC - Modal Deployment / notify-deploy (push) Has been skipped

This commit is contained in:
DatTT127
2026-07-19 01:18:50 +07:00
parent 2cf97fc554
commit 4504458f04

View File

@@ -92,7 +92,10 @@ def build_and_push(
print(f"Configuring ECR authentication...")
region = os.getenv("AWS_REGION", "us-east-1")
ecr = boto3.client("ecr", region_name=region)
if registry.startswith("public.ecr.aws"):
ecr = boto3.client("ecr-public", region_name=region)
else:
ecr = boto3.client("ecr", region_name=region)
auth = ecr.get_authorization_token()
token = auth["authorizationData"][0]["authorizationToken"]
username, password = base64.b64decode(token).decode().split(":")