Skip to content

Commit 8c41979

Browse files
committed
staging check for prs to main
1 parent 445f8f6 commit 8c41979

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,29 @@ on:
44
push:
55
branches:
66
- main
7+
- staging
78
paths-ignore:
89
- "**.md"
910
pull_request:
1011
branches:
1112
- main
13+
- staging
1214
paths-ignore:
1315
- "**.md"
1416
env:
1517
CARGO_TERM_COLOR: always
1618
GCP_ZONE: europe-west3-a
1719

1820
jobs:
21+
check_branch:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Check branch
25+
if: github.base_ref == 'main' && github.head_ref != 'staging'
26+
run: |
27+
echo "ERROR: You can only merge to main from staging."
28+
exit 1
29+
1930
create-runner:
2031
runs-on: ubuntu-latest
2132
outputs:

0 commit comments

Comments
 (0)