Closed yogurtearl closed 10 months ago
Thanks for pointing out that this is an issue. I've updated the documentation to explain that enabling caching for merge_group
is generally not helpful.
Unfortunately, any merge_group
triggered job will execute against a temporary branch, and there's not really anything this action can do to make written cache entries available to other branch executions.
Info about Merge Queues: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#about-merge-queues
If we build on the
merge_group:
trigger for themain
queue, the cache is read-only. It would be nice if we could cache from themerge_group
trigger and avoid having to also build onpush
trigger onmain
.Would need a config like this:
But even with that fix, not sure we can restore the cache on pull requests, until this is addressed: https://github.com/orgs/community/discussions/66430
Until that is addressed, might want to add something saying you shouldn't write to cache from the
merge_group
trigger.