jetify-com / devbox-install-action

31 stars 15 forks source link

Replace github cache action with restore and save #24

Closed LucilleH closed 11 months ago

LucilleH commented 11 months ago

What

Instead of letting action/cache do the restoring and saving cache for us, we choose when to restore and when to save cache.

In this case, we will be saving cache immediately after the devbox package installation, instead of waiting for the action post run. This way, the tar sudo permission stays intact until the cache is saved.

More specifically, action/cache/save runs before the last step of restoring tar to its original permission (as oppose to after)

LucilleH commented 11 months ago
  • We save the cache even if the test fails which could potentially leave the cache in a bad state.

Do you mean even if devbox install fails? I think the cache step won't run if the previous step devbox install fails