Invalidate the CI cache when containers are changed#4394
Invalidate the CI cache when containers are changed#4394JordanMartinez merged 2 commits intopurescript:masterfrom
Conversation
|
It looks like my guess was correct 😄. Take a look at these runs: pre-container-bump: https://github.com/purescript/purescript/actions/runs/2767436187/jobs/4349010103 All of these runs use the same cache key for CI. If I understand correctly, the reason why the container-bump-pr was able to build just fine was because GitHub isolates the caches when on different branches or forks, so it just built its own Edit: Also feel free to add a CHANGELOG.d for this if anyone's up for merging. I wrote this on-the-go and might not get to it until tomorrow... |
| /root/.stack | ||
| ${{ steps.haskell.outputs.stack-root }} | ||
| key: "${{ runner.os }}-MdyPsf-${{ hashFiles('stack.yaml') }}" | ||
| key: "${{ runner.os }}-${{ job.container.id }}-MdyPsf-${{ hashFiles('stack.yaml') }}" |
There was a problem hiding this comment.
Where are the docs on job.container.id?
There was a problem hiding this comment.
Under "contexts" https://docs.github.com/en/actions/learn-github-actions/contexts
|
Nice, thanks for fixing this! |
Description of the change
This changes the cache keys for the workflows to take into account the container they're being run on. As mentioned in #4391 (comment), CI is currently failing with a
libtinfoerror:My guess is that it has to do with the cache being retained after the container was changed since #4391 itself didn't run into this failure as it built its own
weeder.Checklist: