Skip to content

Commit 1810bef

Browse files
BambooinWindyValley
authored andcommitted
ci: fix wrong filter on push event
The forked repo non main branch won't trigger workflow, is hard for preparing pull request on non main branch in forked repo. First of all, we should trigger push event on any branch, the current filter is wrong, which won't trigger workflow on **forked repo** push event. The grammar is wrong by the document: https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow#example-including-and-excluding-branches > If you define a branch with the ! character, you must also define at least one branch without the ! character. If you only want to exclude branches, use branches-ignore instead. Secondly, the main branch should trigger commit build in case of merge or rebase with pull requests.
1 parent 3aecf38 commit 1810bef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/commit-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Commit CI
33
on:
44
push:
55
branches:
6-
- '!master'
7-
tags:
8-
- '![0-9]+.*'
6+
- '**'
7+
tags-ignore:
8+
- '**'
99
pull_request:
1010
workflow_dispatch:
1111

0 commit comments

Comments
 (0)