From ec17d1db184b213843ac5f3dc51de8a0bb78e6a9 Mon Sep 17 00:00:00 2001 From: BD103 <59022059+BD103@users.noreply.github.com> Date: Sat, 20 Apr 2024 12:06:38 -0400 Subject: [PATCH] fix: don't save caches from merge queues This is a just in case, and likely will never become a problem. Github's cache isolation policy prevents caches created in merge queues from being used by any other branch. --- .github/actions/cache/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 323d6a0364ac2..2f00abf774710 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -72,7 +72,8 @@ runs: # Either save a new cache... - name: Save cache - if: ${{ inputs.action == 'save' }} + # We don't save caches from the merge queue either, due to Github's cache isolation policy. + if: ${{ inputs.action == 'save' && github.event_name != 'merge_group' }} uses: actions/cache/save@v4 with: path: |