cache icon indicating copy to clipboard operation
cache copied to clipboard

Is there a way to store cache after some special step and then continue workflow ?

Open kuvaldini opened this issue 4 years ago • 4 comments

I have a job with the steps like:

job:
  steps:
    - checkout
    - actions/cache@v2
    - build
    #- I'd like to store cache at this moment 
    - test

Is there a way to store cache after some special step and then continue workflow ?

kuvaldini avatar May 13 '21 03:05 kuvaldini

Same. Use case: install pnpm modules and then immediately store cache, before running the actual job which might fail

wmertens avatar Jul 09 '21 06:07 wmertens

This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.

github-actions[bot] avatar May 05 '22 08:05 github-actions[bot]

I worked around it with a separate step that doesn't run the build. It's not great because you do a teardown in between but ok.

wmertens avatar May 05 '22 12:05 wmertens

@wmertens did you solve the problem? Let us look at it.

kuvaldini avatar May 10 '22 08:05 kuvaldini

+1

steven-johnson avatar Oct 20 '22 16:10 steven-johnson

Same. Use case: install pnpm modules and then immediately store cache, before running the actual job which might fail

@wmertens can you please me understand better why would the job fail here?

tanuj077 avatar Nov 02 '22 10:11 tanuj077

@tanuj077 even something as simple as eslint failing should fail the job but retain the cache

wmertens avatar Nov 02 '22 13:11 wmertens

@wmertens Is the ask similar to https://github.com/actions/cache/issues/272

kotewar avatar Nov 02 '22 13:11 kotewar

@kotewar yes this seems to be a duplicate

wmertens avatar Nov 02 '22 14:11 wmertens

Closing as duplicate, we'll post further updates in #272.

kotewar avatar Nov 03 '22 05:11 kotewar

Hey all, 👋🏽

We have created a discussion with a proposal that we feel will solve this problem, do let us know your feedback, thanks 😊

kotewar avatar Dec 07 '22 12:12 kotewar