Skip to content

Commit 1320aef

Browse files
authored
Merge pull request #7 from per1234/sync-labels-fix
Fix bugs in dry run determination code for "Sync Labels" workflow
2 parents d8468df + 5b91098 commit 1320aef

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/sync-labels.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,14 @@ jobs:
9191
- name: Determine whether to dry run
9292
id: dry-run
9393
if: >
94-
github.event == 'pull_request' ||
95-
github.ref != format('refs/heads/{0}', github.event.repository.default_branch)
94+
github.event_name == 'pull_request' ||
95+
(
96+
(
97+
github.event_name == 'push' ||
98+
github.event_name == 'workflow_dispatch'
99+
) &&
100+
github.ref != format('refs/heads/{0}', github.event.repository.default_branch)
101+
)
96102
run: |
97103
# Use of this flag in the github-label-sync command will cause it to only check the validity of the
98104
# configuration.

0 commit comments

Comments
 (0)