We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e317337 commit e6996a7Copy full SHA for e6996a7
.github/workflows/flow-guard.yml
@@ -0,0 +1,29 @@
1
+name: Flow Guard
2
+on:
3
+ pull_request:
4
+ types: [opened, synchronize, reopened]
5
+jobs:
6
+ flow-guard:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - name: Validate promotion path
10
+ run: |
11
+ BASE="${{ github.event.pull_request.base.ref }}"
12
+ HEAD="${{ github.event.pull_request.head.ref }}"
13
+ echo "Base: $BASE Head: $HEAD"
14
+
15
+ if [ "$BASE" = "staging" ]; then
16
+ if [ "$HEAD" != "dev" ]; then
17
+ echo "ERROR: staging can only receive PRs from dev."
18
+ exit 1
19
+ fi
20
21
22
+ if [ "$BASE" = "master" ]; then
23
+ if [ "$HEAD" != "staging" ]; then
24
+ echo "ERROR: master can only receive PRs from staging."
25
26
27
28
29
+ echo "Flow guard passed."
0 commit comments