GithubHelp home page GithubHelp logo

Comments (21)

aiqiaoy avatar aiqiaoy commented on June 1, 2024 23

The PR to allow all events to access cache is merged into master. It will be released as part of cache v2. We are targeting releasing v2 later this month.

You can ping to actions/cache@master to preview this feature.

from cache.

nikolaeu avatar nikolaeu commented on June 1, 2024 20

repository_dispatch would be really nice to have covered as well :)

from cache.

Yikun avatar Yikun commented on June 1, 2024 17

The cache support brings 80%+ improvement in our workflow, I'd like to see the schedule could be supported.🙏

from cache.

joshmgross avatar joshmgross commented on June 1, 2024 13

Since this issue has all the context, I've changed it to focus on us opening the cache up for more events. Thanks for the feedback!

I'm tracking the confusing error message here: #64

from cache.

bluelovers avatar bluelovers commented on June 1, 2024 9

hope can support schedule

from cache.

Hvass-Labs avatar Hvass-Labs commented on June 1, 2024 8

I would also like to use cached pip install for cron scheduled daily testing of Jupyter Notebooks : https://github.com/SimFin/simfin-tutorials/blob/master/.github/workflows/test.yml

I currently get this message in GitHub Actions: [warning]Event Validation Error: The event type schedule is not supported. Only push, pull_request events are supported at this time.

Thanks!

from cache.

steel avatar steel commented on June 1, 2024 6

Yes. Please have this support a repository_dispatch event. We're using this as a mechanism to trigger a build on master.

from cache.

jahed avatar jahed commented on June 1, 2024 4

Saw a similar warning for one of my scheduled workflows. The same workflow ran fine 2 days ago (November 4). It failed yesterday too (November 5) so may be an issue on GitHub's end. Possibly the way permissions are granted to use the cache.

from cache.

jahed avatar jahed commented on June 1, 2024 3

That makes sense. The runs that did work for me were triggered on push.

In addition to updating documentation, may I suggest improving the error message? To say that the action is not supported on the event that triggered it. Saves people having to dig through documentation for special cases.

from cache.

Ignigena avatar Ignigena commented on June 1, 2024 1

Definitely would love to see this open up to other event types, particularly deployment and deployment_status. Our workflow is running smoke tests after a deployment happens. Since we can't use the caching action it takes a few minutes to download and install the necessary dependencies every time it's run.

Being able to cache this like we do with our push and pull_request events would save a ton of time.

from cache.

chemitaxis avatar chemitaxis commented on June 1, 2024 1

Hi @joshmgross yes please, open to other events likes on: ["deployment"]

We are using this workaround in this moment, but caching is not working...

https://github.community/t5/GitHub-Actions/GitHub-Actions-Manual-Trigger-Approvals/td-p/31504

Thanks!!

from cache.

jasonkarns avatar jasonkarns commented on June 1, 2024 1

Would it be possible to revert to the previous behavior where this was only a warning instead of an error? All my usages of the cache are an optimization to make the job run faster. A cache miss (or in this case, skipping the cache lookup entirely due to unsupported event type) can be safely ignored and continue without the cache optimization.

from cache.

joshmgross avatar joshmgross commented on June 1, 2024 1

@jasonkarns Yep, we're fixing that. Apologies for the break.

Fixing it here: #108

For a temporary workaround, you can use the previous version of the action with

uses: actions/[email protected]

or use an if statement like so:

    - name: My Cache
      if: github.event_name == 'push' || github.event_name == 'pull_request'
      uses: actions/cache@v1
      with:
        path: .github
        key: ${{ runner.os }}-github

from cache.

mikkelbd avatar mikkelbd commented on June 1, 2024 1

Would love to see caching support for deployment events. Any update on this issue and maybe a rough ETA? 🙏 😄

from cache.

craig-day avatar craig-day commented on June 1, 2024 1

I'm curious why only push and pull_request events are cached? Is there a system limitation, or just not implemented yet? I would be happy to take a stab at implementing caching for more event types if bandwidth is the problem.

from cache.

joshmgross avatar joshmgross commented on June 1, 2024

The cache is currently limited to push and pull_request events. We're looking into opening it up to more event types in the future.

I've filed an issue internally to get the docs updated with this information.

from cache.

lightswitch05 avatar lightswitch05 commented on June 1, 2024

I have a cron-based action that could benefit greatly from caching: auto-updates.yml

from cache.

chemitaxis avatar chemitaxis commented on June 1, 2024

@lightswitch05 can you please explain the workflow? Thanks

from cache.

lightswitch05 avatar lightswitch05 commented on June 1, 2024

Sure. PHP Version Audit self-updates twice a day using an auto-updates.yml action. The update function requires a lot of file downloads, and so was designed to make use of heavy caching. Along with the dependency install before the self-update can run, the action would benefit from cache support.

from cache.

localheinz avatar localheinz commented on June 1, 2024

Any news on getting support for other events as well?

This would significantly speed up deployments decoupled from actual pushes by configuring workflows that listen to deployment events!

🤓

Let us know if there is anything we can do to help!

from cache.

simonw avatar simonw commented on June 1, 2024

I wrote about my desire for this feature on my blog: https://simonwillison.net/2020/Apr/14/datasette-clone/

I use scheduled actions to update SQLite databases: step 1 is to download the existing DB file, step 2 updates it, step 3 publishes it again if it has changed. I'd like to be able to use caching to skip that initial download!

from cache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.