From bf2a15ee94874758c21b91220b4d0ab84f762423 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Thu, 18 Aug 2022 12:35:47 -0600 Subject: [PATCH] Fix cache-read-only for scheduled jobs The fix for #383 introduced a bug that caused the post-action to fail when attemping to resolve `cache-read-only` for scheduled jobs. This has been fixed with an explicit (rather than implicit) check for 'event.repository != null'. Fixes #409 --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index f777d49..460a05b 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.event.repository && github.ref_name != github.event.repository.default_branch }} + default: ${{ github.event.repository != null && github.ref_name != github.event.repository.default_branch }} cache-write-only: description: |