Use lambdas and pack expansion to reduce template instantiations in action_dispatch

2 jobs for improved-action-dispatch in 167 minutes and 30 seconds (queued for 2 seconds)
Status Name Job ID Coverage
  Test
passed job_clang_amd64 #4826
amd64

02:47:29

passed job_gcc_amd64 #4825
amd64

02:05:14