Skip to content

Commit da49a5a

Browse files
authored
Merge pull request #287 from per1234/sync-labels-fix
Fix bugs in dry run determination code for "Sync Labels" workflow
2 parents 0b40408 + 6f1217e commit da49a5a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: .github/workflows/sync-labels.yml

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

0 commit comments

Comments
 (0)