Implement a function to add an action.