| ▲ | embedding-shape 9 hours ago | |||||||
> How do you handle persistent state in your actions? You shouldn't. Besides caching that is. > All the options I could find for caching deps sounded so complicated. In reality, it's fairly simple, as long as you leverage content-hashing. First, take your lock file, compute the sha256sum. Then check if the cache has an artifact with that hash as the ID. If it's found, download and extract, those are your dependencies. If not, you run the installation of the dependencies, then archive the results, with the ID set to the hash. It really isn't more to it. I'm sure there are helpers/sub-actions/whatever Microsoft calls it, for doing all of this with 1-3 lines or something. | ||||||||
| ▲ | ufo 8 hours ago | parent [-] | |||||||
The tricky bit for me was figuring out which cache to use, and how to use and test it locally. Do you use the proprietary github actions stuff? If the installation process inside the actions runner is different from what we use in the developer machines, now we have two sets of scripts and it's harder to test and debug... | ||||||||
| ||||||||