Use command to update core, supervisor, and os from automation?

Is there any way to do this? Maybe a script that is run by something or preferably just an action of some sort.