Many actions require steps like installing
apt packages or downloading and installing CLIs or build related tools that are prerequisites to the primary tasks to be done within a GitHub action.
Typically these prerequisites don’t change very often yet the time must be spent installing them over and over each time the repo contents frequently change. Are there techniques to help mitigate this?
For example, jobs execute in parallel so if there was a way to tie Job 1 (“prereqs”) as a dependency of Step 6 of job 2 (but not job 2 as a whole), then steps 1-5 of job 2 could start executing along with job 1 and job 1 would likely complete before step 6 of job 2 was reached. If not, step 6 of job 2 would wait until job 1 completes. AFAIK this isn’t possible today? - I’d have to execute things sequentially in the same job or have job 2 depend on job 1 (same result?) or take a chance that job 1 may not be done before some part of it is needed in job 2.
Or if there was some way to have a pool of agents with steps from a job that can be cached in some way so they are not executed each time?