Skip to content

Commit

Permalink
Don't set cache-read-only for scheduled workflows
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bigdaz committed Aug 16, 2022
1 parent 1e61c9a commit e4e8267
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.yml
Expand Up @@ -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: |
Expand Down

0 comments on commit e4e8267

Please sign in to comment.