diff --git a/infra/scripts/docker-build.ps1 b/infra/scripts/docker-build.ps1 index 4af1ab6c..fc9b3056 100644 --- a/infra/scripts/docker-build.ps1 +++ b/infra/scripts/docker-build.ps1 @@ -39,9 +39,10 @@ function Build-And-Push-Image { if($CONTAINER_APP_NAME) { + $timestamp = Get-Date -Format "yyyyMMddHHmmss" Write-Host "Updating the Container app registry server & image" az containerapp registry set --name $CONTAINER_APP_NAME --resource-group $AZURE_RESOURCE_GROUP --server "$ACR_NAME.azurecr.io" --identity $CONTAINER_APP_USER_IDENTITY_ID --only-show-errors - az containerapp update --name $CONTAINER_APP_NAME --resource-group $AZURE_RESOURCE_GROUP --image $IMAGE_URI --only-show-errors + az containerapp update --name $CONTAINER_APP_NAME --resource-group $AZURE_RESOURCE_GROUP --image $IMAGE_URI --set-env-vars REFRESH_TIMESTAMP=$timestamp --only-show-errors Write-Host "Updated the registry for Container: $CONTAINER_APP_NAME" } } diff --git a/infra/scripts/docker-build.sh b/infra/scripts/docker-build.sh index 9e9e8cbc..b08b72b7 100755 --- a/infra/scripts/docker-build.sh +++ b/infra/scripts/docker-build.sh @@ -100,6 +100,7 @@ build_and_push_image() { --name "$CONTAINER_APP" \ --resource-group "$AZURE_RESOURCE_GROUP" \ --image "$IMAGE_URI" \ + --set-env-vars REFRESH_TIMESTAMP=$(date +%Y%m%d%H%M%S) \ --only-show-errors echo "Updated registry for container app: $CONTAINER_APP"