We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3591557 commit a2977f0Copy full SHA for a2977f0
1 file changed
.github/workflows/only-develop-to-main.yml
@@ -0,0 +1,18 @@
1
+name: only-develop-to-main
2
+
3
+on:
4
+ pull_request:
5
+ branches: ["main"]
6
7
+jobs:
8
+ enforce:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Allow only develop -> main PRs
12
+ run: |
13
+ echo "head_ref: ${{ github.head_ref }}"
14
+ echo "base_ref: ${{ github.base_ref }}"
15
+ if [ "${{ github.base_ref }}" = "main" ] && [ "${{ github.head_ref }}" != "develop" ]; then
16
+ echo "Only PRs from 'develop' to 'main' are allowed."
17
+ exit 1
18
+ fi
0 commit comments