add onconfirm action and env variable support