Skip to content

ci: replace codfish release action - #335

Merged
moshloop merged 1 commit into
masterfrom
ci/replace-codfish-release-dkad1f06dk9k
Jul 29, 2026
Merged

ci: replace codfish release action#335
moshloop merged 1 commit into
masterfrom
ci/replace-codfish-release-dkad1f06dk9k

Conversation

@moshloop

@moshloop moshloop commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Updated the release process to use the shared release workflow.
    • Improved coordination between release creation, builds, uploads, and generated pull requests.
    • Ensured release artifacts are built and uploaded using the correct release version and tag.

…lease workflow

GitHub blocked codfish/semantic-release-action for a ToS violation on
2026-06-25, so every release run since then died while resolving actions
with "Repository access blocked" and no tag has been cut since v1.53.1.

Call flanksource/action-workflows create-release.yml instead, matching
duty/config-db/incident-commander, and rewire the downstream jobs to its
published/version/tag outputs.

Also export GOOS/GOARCH to the hx build: cmd/hx/Makefile derives the .exe
suffix from $(GOOS), so the Windows leg was producing hx rather than the
hx.exe its rename step expects.

Claude-Session-Id: 7e8f563e-0830-4071-8aa0-f903fd93396b
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The release workflow now delegates release creation to a shared reusable workflow. Client bumps, binary builds, and release uploads consume its publication status, version, and tag outputs, with explicit build environment variables for GOOS and GOARCH.

Changes

Release pipeline

Layer / File(s) Summary
Release creation and output wiring
.github/workflows/release.yml
The local semantic-release job is replaced with the shared create-release workflow, and client bump commands use its publication and version outputs.
Binary build and release upload
.github/workflows/release.yml
Binary gating, build versioning, job dependencies, and release uploads now use create-release outputs; the build step explicitly sets GOOS and GOARCH.

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseWorkflow
  participant CreateRelease
  participant HxBinaries
  participant HxUploadRelease
  ReleaseWorkflow->>CreateRelease: invoke reusable release workflow
  CreateRelease-->>ReleaseWorkflow: return published, version, and tag
  ReleaseWorkflow->>HxBinaries: gate build and pass version
  HxBinaries->>HxUploadRelease: provide built artifacts
  HxUploadRelease->>CreateRelease: upload artifacts using release tag
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main CI change: replacing the release action/workflow implementation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/replace-codfish-release-dkad1f06dk9k
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch ci/replace-codfish-release-dkad1f06dk9k

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Gavel summary

Source Pass Fail Skip Duration
collections 60 0 0 3.1s
files 41 0 0 133ms
github.com/flanksource/commons/certs 4 0 0 410ms
github.com/flanksource/commons/cmd/hx 8 0 0 -
github.com/flanksource/commons/cmd/hx/parse 26 0 0 -
github.com/flanksource/commons/collections/syncmap 10 0 0 -
github.com/flanksource/commons/context 1 0 0 -
github.com/flanksource/commons/duration 2 0 0 -
github.com/flanksource/commons/files 16 0 0 -
github.com/flanksource/commons/har 30 0 0 -
github.com/flanksource/commons/hash 13 0 0 -
github.com/flanksource/commons/http 95 0 2 12.0s
github.com/flanksource/commons/logger 49 0 0 10ms
github.com/flanksource/commons/logger/httpretty/internal/color 15 0 0 -
github.com/flanksource/commons/logger/httpretty/internal/header 1 0 0 -
github.com/flanksource/commons/lookup 7 0 0 10ms
github.com/flanksource/commons/merge 28 0 0 -
github.com/flanksource/commons/test 5 0 1 10ms
github.com/flanksource/commons/text 1 0 0 -
github.com/flanksource/commons/tokenizer 3 0 0 -
logger 41 0 0 1ms
set 7 0 0 2ms

Totals: 463 passed · 0 failed · 3 skipped · 15.6s

View full results

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Line 56: Pass release outputs through step environment variables instead of
interpolating them into shell source: at .github/workflows/release.yml lines
56-56, expose version as COMMONS_VERSION and use it in the commons dependency;
at lines 123-123, expose version as RELEASE_VERSION and assign VERSION from that
variable; at lines 161-161, expose tag as RELEASE_TAG and quote it in the gh
release upload command.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e81ff15c-fd97-4c48-a4ea-37de9023b840

📥 Commits

Reviewing files that changed from the base of the PR and between bf87bbc and 9765b1f.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

# Sleep to let index refresh
sleep 60
go get github.com/flanksource/commons@v${{ needs.semantic-release.outputs.release-version }}
go get github.com/flanksource/commons@v${{ needs.create-release.outputs.version }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Pass release outputs through environment variables before shell execution.

The reusable workflow outputs are inserted into generated shell source. If those values are ever attacker-controlled or insufficiently constrained, shell metacharacters can execute commands in release jobs.

  • .github/workflows/release.yml#L56-L56: expose version as a step environment variable and use "github.com/flanksource/commons@v${COMMONS_VERSION}".
  • .github/workflows/release.yml#L123-L123: expose version as an environment variable and use VERSION="$RELEASE_VERSION".
  • .github/workflows/release.yml#L161-L161: expose tag as an environment variable and use gh release upload "$RELEASE_TAG" ....
Proposed pattern
+        env:
+          COMMONS_VERSION: ${{ needs.create-release.outputs.version }}
         run: |
-          go get github.com/flanksource/commons@v${{ needs.create-release.outputs.version }}
+          go get "github.com/flanksource/commons@v${COMMONS_VERSION}"

         env:
           GOOS: ${{ matrix.goos }}
           GOARCH: ${{ matrix.goarch }}
+          RELEASE_VERSION: ${{ needs.create-release.outputs.version }}
-        run: make -C cmd/hx build VERSION=${{ needs.create-release.outputs.version }}
+        run: make -C cmd/hx build VERSION="$RELEASE_VERSION"

         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           GH_REPO: ${{ github.repository }}
-        run: gh release upload "${{ needs.create-release.outputs.tag }}" dist/hx_* --clobber
+          RELEASE_TAG: ${{ needs.create-release.outputs.tag }}
+        run: gh release upload "$RELEASE_TAG" dist/hx_* --clobber
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
go get github.com/flanksource/commons@v${{ needs.create-release.outputs.version }}
env:
COMMONS_VERSION: ${{ needs.create-release.outputs.version }}
run: |
go get "github.com/flanksource/commons@v${COMMONS_VERSION}"
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
RELEASE_VERSION: ${{ needs.create-release.outputs.version }}
run: make -C cmd/hx build VERSION="$RELEASE_VERSION"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
RELEASE_TAG: ${{ needs.create-release.outputs.tag }}
run: gh release upload "$RELEASE_TAG" dist/hx_* --clobber
🧰 Tools
🪛 zizmor (1.26.1)

[info] 56-56: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

📍 Affects 1 file
  • .github/workflows/release.yml#L56-L56 (this comment)
  • .github/workflows/release.yml#L123-L123
  • .github/workflows/release.yml#L161-L161
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml at line 56, Pass release outputs through step
environment variables instead of interpolating them into shell source: at
.github/workflows/release.yml lines 56-56, expose version as COMMONS_VERSION and
use it in the commons dependency; at lines 123-123, expose version as
RELEASE_VERSION and assign VERSION from that variable; at lines 161-161, expose
tag as RELEASE_TAG and quote it in the gh release upload command.

Source: Linters/SAST tools

@moshloop
moshloop merged commit fbab81e into master Jul 29, 2026
10 checks passed
@moshloop
moshloop deleted the ci/replace-codfish-release-dkad1f06dk9k branch July 29, 2026 03:34
@flankbot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.54.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants