11name : Check Base-Branch [pr]
22on : [ pull_request, pull_request_target, pull_request_review_comment, pull_request_review ]
33jobs :
4- check_base-branch :
5- name : Check-fix invalid head=>base pairs
4+ check_base-branch_dev :
5+ name : Check-fix invalid head=>base pairs (dev)
6+ runs-on : ubuntu-latest
7+ steps :
8+ - name : Dump GitHub context
9+ env :
10+ GITHUB_CONTEXT : ${{ toJson(github) }}
11+ run : echo "$GITHUB_CONTEXT"
12+ - name : Dump job context
13+ env :
14+ JOB_CONTEXT : ${{ toJson(job) }}
15+ run : echo "$JOB_CONTEXT"
16+ - name : Dump steps context
17+ env :
18+ STEPS_CONTEXT : ${{ toJson(steps) }}
19+ run : echo "$STEPS_CONTEXT"
20+ - name : Dump runner context
21+ env :
22+ RUNNER_CONTEXT : ${{ toJson(runner) }}
23+ run : echo "$RUNNER_CONTEXT"
24+ - name : Dump strategy context
25+ env :
26+ STRATEGY_CONTEXT : ${{ toJson(strategy) }}
27+ run : echo "$STRATEGY_CONTEXT"
28+ - name : Dump matrix context
29+ env :
30+ MATRIX_CONTEXT : ${{ toJson(matrix) }}
31+ run : echo "$MATRIX_CONTEXT"
32+ - if : github.ref == 'refs/heads/dev' || github.head_ref == 'dev' || github.head.ref == 'dev' || github.event.pull_request.head.ref == 'dev'
33+ name : Check base-branch(dev) - main=>next (FORCE)
34+ uses : dezren39/check-base-branch-action@v2
35+ with :
36+ protected-branches : " main"
37+ default-branch : " next"
38+ update-branch : true
39+ repo-token : " ${{ secrets.GITHUB_TOKEN }}"
40+ check_base-branch_next :
41+ name : Check-fix invalid head=>base pairs (next)
642 runs-on : ubuntu-latest
743 steps :
844 - name : Dump GitHub context
@@ -29,31 +65,79 @@ jobs:
2965 env :
3066 MATRIX_CONTEXT : ${{ toJson(matrix) }}
3167 run : echo "$MATRIX_CONTEXT"
32- - if : github.ref == 'refs/heads/dev' || github.head_ref == 'dev' || github.head.ref == 'dev'
33- name : Check base-branch(dev) - main=>next (FORCE)
34- uses : dezren39/check-base-branch-action@v2
35- with :
36- protected-branches : " main"
37- default-branch : " next"
38- update-branch : true
39- repo-token : " ${{ secrets.GITHUB_TOKEN }}"
40- - if : github.ref == 'refs/heads/next' || github.head_ref == 'next' || github.head.ref == 'next'
68+ - if : github.ref == 'refs/heads/next' || github.head_ref == 'next' || github.head.ref == 'next' || github.event.pull_request.head.ref == 'next'
4169 name : Check base-branch(next) - dev=>main
4270 uses : dezren39/check-base-branch-action@v2
4371 with :
4472 protected-branches : " dev"
4573 default-branch : " main"
4674 update-branch : false
4775 repo-token : " ${{ secrets.GITHUB_TOKEN }}"
48- - if : github.ref == 'refs/heads/main' || github.head_ref == 'main' || github.head.ref == 'main'
76+ check_base-branch_main :
77+ name : Check-fix invalid head=>base pairs (main)
78+ runs-on : ubuntu-latest
79+ steps :
80+ - name : Dump GitHub context
81+ env :
82+ GITHUB_CONTEXT : ${{ toJson(github) }}
83+ run : echo "$GITHUB_CONTEXT"
84+ - name : Dump job context
85+ env :
86+ JOB_CONTEXT : ${{ toJson(job) }}
87+ run : echo "$JOB_CONTEXT"
88+ - name : Dump steps context
89+ env :
90+ STEPS_CONTEXT : ${{ toJson(steps) }}
91+ run : echo "$STEPS_CONTEXT"
92+ - name : Dump runner context
93+ env :
94+ RUNNER_CONTEXT : ${{ toJson(runner) }}
95+ run : echo "$RUNNER_CONTEXT"
96+ - name : Dump strategy context
97+ env :
98+ STRATEGY_CONTEXT : ${{ toJson(strategy) }}
99+ run : echo "$STRATEGY_CONTEXT"
100+ - name : Dump matrix context
101+ env :
102+ MATRIX_CONTEXT : ${{ toJson(matrix) }}
103+ run : echo "$MATRIX_CONTEXT"
104+ - if : github.ref == 'refs/heads/main' || github.head_ref == 'main' || github.head.ref == 'main' || github.event.pull_request.head.ref == 'main'
49105 name : Check base-branch(main) - next=>dev
50106 uses : dezren39/check-base-branch-action@v2
51107 with :
52108 protected-branches : " next"
53109 default-branch : " dev"
54110 update-branch : false
55111 repo-token : " ${{ secrets.GITHUB_TOKEN }}"
56- - if : github.ref != 'refs/heads/dev' && github.ref != 'refs/heads/next' && github.ref != 'refs/heads/main' && github.head_ref != 'dev' && github.head.ref != 'dev' && github.head_ref != 'next' && github.head.ref != 'next' && github.head_ref != 'main' && github.head.ref != 'main'
112+ check_base-branch_feature :
113+ name : Check-fix invalid head=>base pairs (feature)
114+ runs-on : ubuntu-latest
115+ steps :
116+ - name : Dump GitHub context
117+ env :
118+ GITHUB_CONTEXT : ${{ toJson(github) }}
119+ run : echo "$GITHUB_CONTEXT"
120+ - name : Dump job context
121+ env :
122+ JOB_CONTEXT : ${{ toJson(job) }}
123+ run : echo "$JOB_CONTEXT"
124+ - name : Dump steps context
125+ env :
126+ STEPS_CONTEXT : ${{ toJson(steps) }}
127+ run : echo "$STEPS_CONTEXT"
128+ - name : Dump runner context
129+ env :
130+ RUNNER_CONTEXT : ${{ toJson(runner) }}
131+ run : echo "$RUNNER_CONTEXT"
132+ - name : Dump strategy context
133+ env :
134+ STRATEGY_CONTEXT : ${{ toJson(strategy) }}
135+ run : echo "$STRATEGY_CONTEXT"
136+ - name : Dump matrix context
137+ env :
138+ MATRIX_CONTEXT : ${{ toJson(matrix) }}
139+ run : echo "$MATRIX_CONTEXT"
140+ - if : github.ref != 'refs/heads/dev' && github.ref != 'refs/heads/next' && github.ref != 'refs/heads/main' && github.head_ref != 'dev' && github.head.ref != 'dev' && github.head_ref != 'next' && github.head.ref != 'next' && github.head_ref != 'main' && github.head.ref != 'main' || github.event.pull_request.head.ref == 'dev' || github.event.pull_request.head.ref == 'next' || github.event.pull_request.head.ref == 'main'
57141 name : Check base-branch(feature) - main,next=>dev (FORCE)
58142 uses : dezren39/check-base-branch-action@v2
59143 with :
0 commit comments