By splitting the restore and save steps of the cache action, we can run some steps after the post cache step which otherwise would be run at the end of the workflow.
This allows us to clean the cache directory after it has been saved. This fixes #94, allows us to save the cache even if the rest of the workflow fails and also has the minor benefit of reduced disk usage.
Differences for existing workflows:
You can't rely on the ~/cache-apt-pkgs directory being present (you shouldn't).
There is no message from actions/checkout to indicate that the cache is not saved because a cache-hit has occurred.
By splitting the restore and save steps of the cache action, we can run some steps after the post cache step which otherwise would be run at the end of the workflow.
This allows us to clean the cache directory after it has been saved. This fixes #94, allows us to save the cache even if the rest of the workflow fails and also has the minor benefit of reduced disk usage.
Differences for existing workflows:
~/cache-apt-pkgs
directory being present (you shouldn't).