Skip to content

Commit 5fc3ec6

Browse files
committed
ci: fix pull requests not triggering CI
1 parent 5751252 commit 5fc3ec6

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

.github/workflows/build-templates.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
name: Build template
22
on:
3+
workflow_dispatch:
34
push:
5+
branches:
6+
- main
47
paths:
58
- '.github/workflows/build-templates.yml'
69
- 'packages/create-react-native-library/**'
710
- '!**.md'
11+
pull_request:
12+
branches:
13+
- main
814

915
jobs:
1016
build:

.github/workflows/check-project.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Check project
22
on:
33
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
49

510
jobs:
611
check-project:

packages/create-react-native-library/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,7 @@ async function create(argv: yargs.Arguments<any>) {
698698

699699
try {
700700
spawn.sync('git', ['init'], { cwd: folder });
701+
spawn.sync('git', ['branch', '-M', 'main'], { cwd: folder });
701702
spawn.sync('git', ['add', '.'], { cwd: folder });
702703
spawn.sync('git', ['commit', '-m', 'chore: initial commit'], {
703704
cwd: folder,

packages/create-react-native-library/templates/common/$.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: CI
22
on:
33
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
49

510
jobs:
611
lint:

0 commit comments

Comments
 (0)