Skip to content

Commit 629ee6f

Browse files
committed
ci(coverage): harden gate inputs with env binding
1 parent ad6e8c5 commit 629ee6f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/pr-build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,10 @@ jobs:
304304
update-comment: false
305305

306306
- name: Enforce coverage gates
307+
env:
308+
BASE_OVERALL_RAW: ${{ steps.jacoco-base.outputs.coverage-overall }}
309+
PR_OVERALL_RAW: ${{ steps.jacoco-pr.outputs.coverage-overall }}
310+
PR_CHANGED_RAW: ${{ steps.jacoco-pr.outputs.coverage-changed-files }}
307311
run: |
308312
set -euo pipefail
309313
@@ -323,9 +327,9 @@ jobs:
323327
}
324328
325329
# 1) Parse metrics from jacoco-report outputs
326-
BASE_OVERALL="$(sanitize "${{ steps.jacoco-base.outputs.coverage-overall }}")"
327-
PR_OVERALL="$(sanitize "${{ steps.jacoco-pr.outputs.coverage-overall }}")"
328-
PR_CHANGED="$(sanitize "${{ steps.jacoco-pr.outputs.coverage-changed-files }}")"
330+
BASE_OVERALL="$(sanitize "$BASE_OVERALL_RAW")"
331+
PR_OVERALL="$(sanitize "$PR_OVERALL_RAW")"
332+
PR_CHANGED="$(sanitize "$PR_CHANGED_RAW")"
329333
330334
if ! is_number "$BASE_OVERALL" || ! is_number "$PR_OVERALL"; then
331335
echo "Failed to parse coverage values: base='${BASE_OVERALL}', pr='${PR_OVERALL}'."

0 commit comments

Comments
 (0)