From e4e8267f88a4dc100685322f9e33cb1f9252e343 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Tue, 16 Aug 2022 11:08:42 -0600 Subject: [PATCH] Don't set cache-read-only for scheduled workflows For scheduled workflows, we don't know the default branch. In this case cannot determine if the workflow is running on the default branch, and so cannot know when to enable `cache-read-only`. Fixes #383 --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2626a9bf..94488f23 100644 --- a/action.yml +++ b/action.yml @@ -18,7 +18,7 @@ inputs: When 'true', existing entries will be read from the cache but no entries will be written. By default this value is 'false' for workflows on the GitHub default branch and 'true' for workflows on other branches. required: false - default: ${{ github.ref_name != github.event.repository.default_branch }} + default: ${{ github.event.repository && github.ref_name != github.event.repository.default_branch }} cache-write-only: description: |