unity-actions icon indicating copy to clipboard operation
unity-actions copied to clipboard

caching can by embedded to main action due to needed in the 99% cases except some unique

Open Dukobpa3 opened this issue 2 years ago • 3 comments

https://github.com/actions/toolkit/tree/main/packages/cache

Dukobpa3 avatar Oct 14 '21 11:10 Dukobpa3

Excellent idea.

In case we want to support this we would need to support each action, but particularly unity-test-runner and unity-builder. I'm curious if it's feasible when using multiple actions in a single workflow; when cache gets changed or invalidated in either of these actions.

We would also have to come up with some strategy for the cache key. Perhaps it could be as simple as making a composite key based on some of the parameters (i.e. targetPlatform) possibly in conjunction with a hash of the packages manifest file.

What are your thoughts on this?

webbertakken avatar Oct 14 '21 12:10 webbertakken

Here is few answers about "Run ID". https://github.community/t/how-to-get-the-run-id/16587

I think we can operate wit it as key. Also provide option to describe key directly. Maybe I'll want to run two actions in the flow with cleanup between them.

Dukobpa3 avatar Oct 14 '21 13:10 Dukobpa3

That is good info, however we're highly focussed on keeping the workflow easy to setup for experienced and new developers alike. Having to provide a key (technical concept, usually we have a very functional api) that, when providing it, requires internal knowledge about the internal workings of the actions themselves, with regards to caching.

Ideally instead we would abstract over this, so that the implementer doesn't need to worry about it. Perhaps we could get the run-id using GitHub's ACCESS_TOKEN, which we already kind of know is required for some other functionality in the future as well.

A criteria is that it it easier to set up than the current documented approach or has benefits otherwise. Open for proposals on how to elegantly implement caching.

webbertakken avatar Oct 14 '21 18:10 webbertakken