Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Glob Injection/Extraction #16

Open
JakeCooper opened this issue Dec 8, 2023 · 2 comments
Open

Support Glob Injection/Extraction #16

JakeCooper opened this issue Dec 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@JakeCooper
Copy link

I'm attempting to load a cache I know exists into a cache mount

      - name: Cache All node_modules folders
        uses: actions/cache@v3
        with:
          path: ${{ github.workspace }}/**/node_modules
          key: ${{ runner.os }}-node_modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: |
            ${{ runner.os }}-node_modules-${{ env.cache-name }}-
            ${{ runner.os }}-node_modules-
            ${{ runner.io }}-

I know the above works because the output of the pnpm install is as follows

Run pnpm install --frozen-lockfile --prefer-offline
Scope: all 11 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +3757
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

. postinstall$ rm -rf node_modules/@types/react-native
. postinstall: Done
Done in 3.4s

I've tried something as follows but it doesn't seem to mount correctly?

 - name: Load pnpm cache into Docker Container
    uses: reproducible-containers/[email protected]
     with:
         cache-source: ${{ runner.os }}-pnpm-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
          cache-target: /mono/**/node_modules
RUN --mount=type=cache,id=pnpm,target=/mono pnpm install --prod --frozen-lockfile

But alas no luck. Any pointers?

@JakeCooper
Copy link
Author

I assume the glob mount is messing things up here....

@JakeCooper JakeCooper changed the title Pnpm Loading Fails Silently Support Glob Injection/Extraction Dec 8, 2023
@AkihiroSuda AkihiroSuda added the enhancement New feature or request label Dec 11, 2023
@AkihiroSuda
Copy link
Member

What will cache-target: /mono/**/node_modules mean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants