Use lambdas and pack expansion to reduce template instantiations in action_dispatch

2 jobs for improved-action-dispatch in 469 minutes and 1 second
Status Name Job ID Coverage
  Test
passed job_clang_amd64 #4832
amd64

07:49:01

passed job_gcc_amd64 #4831
amd64

05:10:28