Skip to content

Commit 032c908

Browse files
committed
feat: added a checks-done step we could bind our GitHub "Require status checks to pass" rule on
1 parent 523ac3c commit 032c908

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/default.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,24 @@ jobs:
141141
contents: read
142142
pull-requests: write
143143

144+
# Aggregate status check for branch protection rules
145+
checks-done:
146+
name: All Checks Complete
147+
needs: [lint, quality, security, audit-fix, ci, performance]
148+
runs-on: ubuntu-24.04
149+
timeout-minutes: 1
150+
permissions:
151+
contents: read
152+
153+
steps:
154+
- name: All required checks passed
155+
run: echo "✅ All required checks completed successfully"
156+
144157
# Stage 4: Deploy to GitHub Pages (main branch only, requires all previous stages)
145158
deploy:
146159
name: Deploy to GitHub Pages
147-
needs: [ci, performance]
148-
if: always() && needs.ci.result == 'success' && (needs.performance.result == 'success' || needs.performance.result == 'skipped') && github.ref == 'refs/heads/main' && github.event_name == 'push'
160+
needs: [checks-done]
161+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
149162
uses: ./.github/workflows/deploy-pages.yml
150163
secrets: inherit
151164
permissions:
@@ -156,8 +169,8 @@ jobs:
156169
# Stage 5: Release (main branch only, requires all checks to pass)
157170
release:
158171
name: Release Management
159-
needs: [ci, performance, deploy]
160-
if: always() && needs.ci.result == 'success' && (needs.performance.result == 'success' || needs.performance.result == 'skipped') && (needs.deploy.result == 'success' || needs.deploy.result == 'skipped') && github.ref == 'refs/heads/main' && github.event_name == 'push'
172+
needs: [checks-done]
173+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
161174
uses: ./.github/workflows/release.yml
162175
secrets: inherit
163176
permissions:

0 commit comments

Comments
 (0)