Phase transitions in the octupole degree of freedom