Solvedcache Cache container deleted when using in workflow with container jobs

When run within a container job the action fails to run - it looks like the cache action container is deleted in the stop containers phase, before the cache post action is able to run.

Presumably, this only runs within the context of the VM, not the container context?

8 Answers

✔️Accepted Answer

This blocks us from migrating from CircleCI.

Other Answers:

Thanks for reporting this issue. I expect this will be a potential problem with any actions that includes a post action. We will look into it.

Update: I verified this is a bug in the runner and we are working on a fix.

We've rolled out an updated hosted runner that fixes for post actions in container jobs.

Would be awesome to see this fixed guys :)

What about splitting this action into two, similar to actions/upload-artifact / actions/download-artifact (also similar to what CircleCI does)?

  • actions/save-cache
  • actions/restore-cache

This will give the user a lot more control too (e.g. I might want to save the cache even before running the test steps).

Related Issues:

18
cache hashFiles() does not work for valid patterns
hashFiles will be updated soon so that relative paths are rooted at github.workspace which will allo...
17
cache Can this module be used from other JavaScript actions?
@actions/cache@0.1.0 is released Please try it out and file issues under the toolkit repo if you enc...
10
cache Cache container deleted when using in workflow with container jobs
This blocks us from migrating from CircleCI. When run within a container job the action fails to run...