cache icon indicating copy to clipboard operation
cache copied to clipboard

Caching inside GitHub's built-in container support for jobs

Open dime10 opened this issue 3 years ago • 1 comments

Is there a way to make this action work with GitHub's built-in container support for jobs?

For example the step below results in a cache miss, whereas it would produce a cache hit if run without the container: parameter:

jobs:
  test:
    name: Test Job
    runs-on: ubuntu-22.04
    container: quay.io/pypa/manylinux2014_x86_64
    steps:
    - name: Cache Files
      id: cache-files
      uses: actions/cache@v3
      with:
        path: files
        key: some-key

dime10 avatar Sep 14 '22 22:09 dime10

Sadly this topic was brought already time ago in this discussion https://github.com/actions/cache/discussions/709 ... any chance to have a feedback?

ungarida avatar Sep 20 '22 15:09 ungarida

Restoring in another container works: https://github.com/ph-fritsche/repro-action-cache/actions/runs/3882822825/jobs/6623416169#step:4:95 Restoring on the host fails: https://github.com/ph-fritsche/repro-action-cache/actions/runs/3882822825/jobs/6623415998#step:3:90

There is a mismatch for cacheVersion which is determined in cacheHttpClient.getCacheVersion() and depends on which version of zstd is available. The ubuntu-latest host has zstd v1.5.2 while the e.g. the node:lts-slim container does not include zstd.

ph-fritsche avatar Jan 10 '23 10:01 ph-fritsche

@ph-fritsche Thank you so much for your comment. I solved my issue by installing zstd in my container as the first step 🥳

theisgroenbech avatar Mar 18 '23 11:03 theisgroenbech

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 Oct 05 '23 08:10 github-actions[bot]

This issue was closed because it has been inactive for 5 days since being marked as stale.

github-actions[bot] avatar Oct 11 '23 08:10 github-actions[bot]