You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--repository-names "$REPO_NAME" --region us-east-1 >/dev/null 2>&1; then
echo "ECR Public repository $REPO_NAME exists"
exit 0
fi
if CREATE_ERR="$(aws ecr-public create-repository \
--repository-name "$REPO_NAME" --region us-east-1 2>&1 >/dev/null)"; then
echo "created ECR Public repository $REPO_NAME"
elif grep -q RepositoryAlreadyExistsException <<< "$CREATE_ERR"; then
# Concurrent run for another version of the same new service won
# the creation race; the repository exists, which is all we need.
echo "ECR Public repository $REPO_NAME was created concurrently"
else
echo "$CREATE_ERR"
echo "::error::ECR Public repository '$REPO_NAME' does not exist and this role cannot create it (missing ecr-public:CreateRepository). Create it once manually — aws ecr-public create-repository --repository-name '$REPO_NAME' --region us-east-1 — then re-run this workflow."