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

Include caching #8

Open
Beanow opened this issue Mar 6, 2020 · 3 comments
Open

Include caching #8

Beanow opened this issue Mar 6, 2020 · 3 comments

Comments

@Beanow
Copy link
Collaborator

Beanow commented Mar 6, 2020

We could either:

  • Look into including caching as part of the action itself.
  • Add it to the example workflow.

Here's an example of how I implemented caching previously

https://github.com/MetaFam/TheSource/blob/f96bc3f66106ed4341d674b5a37a1fce8035c922/.github/workflows/generate-cred.yml#L19-L27

      - name: SourceCred Cache
        uses: actions/cache@v1
        with:
          # cred-action uses *workspace*/sourcecred_data as it's SOURCECRED_DIRECTORY.
          # Only store the cache from that.
          path: sourcecred_data/cache
          key: SC_CACHE-${{ hashFiles('**/project.json') }}-${{ github.run_id }}
          restore-keys: |
            SC_CACHE-${{ hashFiles('**/project.json') }}-
            SC_CACHE-
@vsoch
Copy link
Contributor

vsoch commented Mar 6, 2020

This feels like something that a deployment of an instance might want to customize, and since it's already packaged nicely in actions/cache@v1 I think we'd want to add it via the workflow file (and provide examples up the wazoo so the user can just copy paste and have it).

@Beanow
Copy link
Collaborator Author

Beanow commented Mar 6, 2020

Actually on that note, what did you think of the idea to use a template repository?

@vsoch
Copy link
Contributor

vsoch commented Mar 6, 2020

100%.

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

No branches or pull requests

2 participants