Remove duplicate code in actions by extracting specific action parts to config.