Use the deployment UUID when preview deployments are built from HEAD so each deployment gets distinct production and build image tags.
Generate pull request preview image tags with both the PR id and commit so different commits on the same PR do not reuse the same image tag. Sanitize and truncate generated tags to stay within Docker tag limits.