Repository navigation
Commit 544b5f4
committed
Use the PR base branch to pick the template in template app workflows
On a pull request `github.ref_name` is `<number>/merge`, which has no
`-stable` in it, so the template app workflows fall back to the template's
`main` branch even when the PR targets a stable branch. On main that is
harmless, since `main` is the right template there. But every stable branch
is cut from main with these files, and its PRs then build and test against
template `main` instead of the matching stable template.
On 0.88-stable this breaks every PR: template `main` pins
@react-native-community/cli 22.0.0-alpha.0, which no longer exports
`createDevServerMiddleware`, so Metro exits with "createCommunityMiddleware
is not a function" and test_e2e_{ios,android}_templateapp fail in all three
attempts, while pushes to the branch pass.
Use `github.base_ref` when it is set, as 0.89-stable already does in its iOS
template workflows. Pushes are unchanged, since `base_ref` is empty there.
Signed-off-by: Gabriel Donadel <donadeldev@gmail.com>1 parent 64af229 commit 544b5f4
4 files changed
Lines changed: 4 additions & 4 deletions
File tree
- .github/workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
0 commit comments