Move self-update mechanism to workflow.py