Don't tar them, as this was broken: we ended up uploading the
build-scan-data directory instead of the tar, while still expecting a
tar when dowloading, which made everything fail.
We don't need tars anyway, as workflow artifacts are already zipped.
We don't need the whole cache, since most (all?) of it is stored on
Develocity already.
Including ./gradle/caches/modules-2 is enough, because that's where
Maven dependencies are stored, and *those* are not stored on Develocity.
Ripped off from Quarkus.
Here's how it will work:
1. We create a cache entry on push only. Pull requests only restore it.
2. We create a new cache entry every day, prefixed with something like
2024-10-25.
3. When restoring the cache, we try the entry for the day first
(2024-10-25) and default to the one for the month (2024-10-*).
Critically, this means we will build each day's cache based on the
previous day's cache.
4. Atlas infra uses its own, separate cache entries.
Co-Authored-By: Guillaume Smet <guillaume.smet@gmail.com>
* Use `pull_request` instead of `pull_request_target`
* Move Develocity build scan publishing for untrusted code to a separate workflow
* Merge Atlas workflow into the main CI workflow
* Split caches between trusted and untrusted code
* Update secrets to use "Develocity" name instead of "Gradle Enterprise"
* Update comments
Co-Authored-By: Yoann Rodière <yoann@hibernate.org>