Skip to content

cache doesn't work with github workspace directory #833

@erwan-joly

Description

@erwan-joly

Hi, I'm trying to cache the whole workspace to fetch it between jobs.
Unfortunately it seems like the local directory can not be cached

Using . doesn't work (it cache 22B)

- name: Cache build folder
        uses: actions/cache@v3
        with:
          key: cs-repo-${{ github.run_number }}-${{ github.run_attempt }}
          path: .

Using ${{ github.workspace }} doesn't work (it also cache 22B)

- name: Cache build folder
        uses: actions/cache@v3
        with:
          key: cs-repo-${{ github.run_number }}-${{ github.run_attempt }}
          path: ${{ github.workspace }}

the only solution I found which work is to list all the files/directory

- name: Cache build folder
        uses: actions/cache@v3
        with:
          key: cs-repo-${{ github.run_number }}-${{ github.run_attempt }}
          path: |
              file1
              file2
              dir1
              dir2

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy