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 Job ID Name Coverage
  Test
passed #4826
amd64
job_clang_amd64

02:47:29

passed #4825
amd64
job_gcc_amd64

02:05:14