File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 11name : 🚨 CI Checks
22
33on :
4+ push :
5+ branches :
6+ - main
47 pull_request :
58 branches :
6- - ' **'
9+ - main
10+ - staging
711
812jobs :
913 check-main-override :
14+ if : github.event_name == 'push'
1015 runs-on : ubuntu-latest
1116 steps :
1217 - name : 🛑 Block direct pushes to main (unless override flag)
1318 run : |
1419 echo "🔍 Event: ${{ github.event_name }} | Ref: ${{ github.ref }}"
15- if [[ "${{ github.event_name }}" == "push" && "${{ github. ref }}" == "refs/heads/main" ]]; then
20+ if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
1621 COMMIT_MSG="${{ github.event.head_commit.message }}"
1722 echo "🔍 Commit message: $COMMIT_MSG"
1823 if [[ "$COMMIT_MSG" != *"[override-main]"* ]]; then
@@ -22,13 +27,13 @@ jobs:
2227 echo "✅ Override flag found. Proceeding."
2328 fi
2429 else
25- echo "ℹ️ Not a direct push to main. Proceeding ."
30+ echo "ℹ️ Not a push to main — skipping override check ."
2631 fi
2732
2833 lint :
2934 name : 🔍 Lint
35+ if : github.event_name == 'pull_request'
3036 runs-on : ubuntu-latest
31- needs : check-main-override
3237 steps :
3338 - uses : actions/checkout@v4
3439 - uses : actions/setup-node@v4
4045
4146 typecheck :
4247 name : ✅ Type Check
48+ if : github.event_name == 'pull_request'
4349 runs-on : ubuntu-latest
44- needs : check-main-override
4550 steps :
4651 - uses : actions/checkout@v4
4752 - uses : actions/setup-node@v4
5358
5459 build :
5560 name : 🔨 Build
61+ if : github.event_name == 'pull_request'
5662 runs-on : ubuntu-latest
57- needs : check-main-override
5863 steps :
5964 - uses : actions/checkout@v4
6065 - uses : actions/setup-node@v4
You can’t perform that action at this time.
0 commit comments