diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 7a3f824d..f4c245ea 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -93,7 +93,13 @@ jobs: id: dry-run if: > github.event_name == 'pull_request' || - github.ref != format('refs/heads/{0}', github.event.repository.default_branch) + ( + ( + github.event_name == 'push' || + github.event_name == 'workflow_dispatch' + ) && + github.ref != format('refs/heads/{0}', github.event.repository.default_branch) + ) run: | # Use of this flag in the github-label-sync command will cause it to only check the validity of the # configuration.