This message was deleted.
# general
s
This message was deleted.
s
IIRC you just need to set the cache directory in the environment, then use the github cache action to restore and save that.
m
Yeah I think it is pretty simple, I thought it wasn’t working correctly since things are still slow but I think it may be a different step
c
@millions-judge-24978 sorry to bump this. did you ever figure this out? I haven’t found much information and the bulk to my runner time is spent pulling the image.
m
Right now I am using the GH VM runner, using
asdf
to install
pulumi
(
asdf-vm/actions/setup@v1
) and these actions for caching:
Copy code
- name: Get yarn cache directory path
        id: yarn-cache-dir-path
        run: echo "::set-output name=dir::$(yarn cache dir)"
      - uses: actions/cache@v2
        id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
        with:
          path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn
      - uses: actions/cache@v2
        id: node-modules-cache
        with:
          path: ${{ github.workspace }}/infrastructure/node_modules
          key: ${{ runner.os }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
      - uses: actions/cache@v2
        id: pulumi-plugins-cache
        with:
          path: ~/.pulumi/plugins
          key: ${{ runner.os }}-pulumi-plugins
I have copied the bash script from the pulumi action and run that after all the above This setup is pretty fast
I'm a big fan of things in containers, but GHA is just much faster if you don't
c
thanks. ill check this out.
m