From 5a0db6cac7201322d57d9126a2d178d553159d02 Mon Sep 17 00:00:00 2001 From: mintaka Date: Thu, 19 Nov 2026 11:12:21 -0500 Subject: [PATCH] ci(cd): refuse a Release when ref-gate finds a private reference (RIG-10858) Run ref-gate in the release job before the release manifest is published to main, before the tag is pushed, and before the GitHub Release is created. A hit fails the release, so no manifest commit lands on main and no tag or Release is created. This is option B from RIG-10858. ref-gate stays advisory in PR CI; CD is the gate that refuses a release. The step mirrors the ref-gate job in ci.yaml: Go 1.27.4, CGO_ENABLED 0, and go -C tools/ref-gate run . --config ref-gate.config.json. The release job's existing checkout (fetch-depth 0) is reused. Co-authored-by: Matt Wilkinson --- .github/workflows/cd.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 5c4e925f4..3a44c9431 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -574,6 +574,11 @@ jobs: with: go-version: '1.27.4' cache: false + - name: Run ref-gate before publishing + env: + CGO_ENABLED: '0' + GATE_ROOT: ${{ github.workspace }} + run: go -C tools/ref-gate run . --config ref-gate.config.json - name: Download plan and assets uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 with: