File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,8 +179,28 @@ jobs:
179179 sarif_file : a11y-results.sarif
180180 category : accessibility-scan/${{ matrix.scan-url.label }}
181181
182- - name : Threshold gate
182+ - name : Save results for threshold gate
183183 if : always()
184+ uses : actions/upload-artifact@v4
185+ with :
186+ name : a11y-sarif-${{ matrix.scan-url.label }}
187+ path : a11y-results.sarif
188+ if-no-files-found : ignore
189+
190+ a11y-gate :
191+ name : Accessibility — Threshold Gate
192+ runs-on : ubuntu-latest
193+ needs : a11y-scan
194+ if : always()
195+ steps :
196+ - name : Download SARIF results
197+ uses : actions/download-artifact@v4
198+ continue-on-error : true
199+ with :
200+ pattern : a11y-sarif-*
201+ merge-multiple : true
202+
203+ - name : Evaluate thresholds
184204 run : |
185205 if [ -f a11y-results.sarif ]; then
186206 CRITICAL_COUNT=$(jq '[.runs[].results[] | select(.level == "error")] | length' a11y-results.sarif 2>/dev/null || echo "0")
@@ -198,4 +218,6 @@ jobs:
198218 echo "::error::Accessibility score $SCORE is below minimum threshold ${{ env.A11Y_FAIL_THRESHOLD }}"
199219 exit 1
200220 fi
221+ else
222+ echo "No SARIF results found — skipping threshold check"
201223 fi
You can’t perform that action at this time.
0 commit comments