That’s a nice little trick. Note that you can also avoid installing dependencies with caching.
yes, ive added a link to the documentation. It makes sense for small things like npm etc, but caching the complete /var/cache/apt/archives directory (to save download time) is probably not useful. One wants to test against the latest package versions and pulling in large amounts of packages, you might easily exceed the maximum cache size of 5 GB…
It makes also sense to set dpkg into unsafe-io option to save some time.. added another statement about this.
Ive now turned the example repository into an action for others to easily use it (from the marketplace), for example: