Skip to content

Conversation

@sanbotto
Copy link
Member

@sanbotto sanbotto commented Nov 25, 2025

Opening the PR without the VERSION file to see if the workflow catches that as an issue.

Summary by CodeRabbit

  • Chores

    • Added a release workflow that validates VERSION, computes release tags, creates/releases Git tags, and bumped project version to v2.1.2.
    • Upgraded CI tooling and action versions across workflows.
  • New Features

    • Build pipeline now supports PR-aware image tags (pr-) and conditional tagging for PR vs main.
    • Added parsing of comma-separated custom tag inputs for dispatched builds.
    • Added a reusable semantic-version comparison utility used by release and PR checks.

✏️ Tip: You can customize this high-level summary in your review settings.

@sanbotto sanbotto self-assigned this Nov 25, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

Walkthrough

Adds a new create-release workflow with validate_version and create_release jobs that run on pushes to main for VERSION, Go files, Dockerfiles, or workflows; it validates the VERSION file (semver, v-prefixed, greater than latest tag when present), computes release tags (prerelease vs stable), creates and pushes the git tag, creates a GitHub Release, and dispatches the image build workflow with computed tags. Updates build-and-push-images to run on PRs, introduces check_version and parse_tags jobs, adds PR-specific tags (pr-<PR-number>) and parsed custom tags, and upgrades several actions. Adds a composite compare_versions action and bumps VERSION to v2.1.2.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: introducing a release workflow (create-release.yaml) and improving image builds (enhancements to build-and-push-images.yaml with upgraded actions, new PR checks, and enhanced tagging logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-release-workflow

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 95276d0 and 4fb990f.

📒 Files selected for processing (2)
  • .github/workflows/build-and-push-images.yaml (8 hunks)
  • .github/workflows/create-release.yaml (1 hunks)
🔇 Additional comments (3)
.github/workflows/create-release.yaml (3)

27-63: VERSION file validation correctly structured and gated.

The validation logic properly checks file existence, v-prefix requirement, semantic versioning format, and gates comparison only when a latest tag exists. The regex pattern for semver validation is well-formed.


104-140: Tag generation logic correctly differentiates prerelease vs. stable; is_prerelease output properly exposed.

Prerelease detection (line 121) checks for hyphen in version string, and the output is correctly set as a string literal "true" or "false" (lines 135–139), enabling downstream steps to use it in GitHub Actions expressions.


65-98: Verification confirmed: compare_versions action exists with correct interface.

The .github/actions/compare_versions/action.yaml file is properly configured:

  • ✅ File exists at the expected path
  • ✅ Provides outputs.result with values gt, lt, eq (lines 76–90)
  • ✅ Matches workflow expectations (lines 81–93 of create-release.yaml)

The version comparison logic is sound, centralizes version semantics into a reusable action, and the conditional gates correctly skip when no previous release exists.


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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/build-and-push-images.yaml (1)

30-30: Unify action versions across jobs.

Action versions differ across jobs:

  • setup and test jobs: checkout@v4, setup-go@v5
  • health-checker job: checkout@v4, setup-go@v5
  • load-balancer job: checkout@v6, setup-go@v6

This inconsistency risks introducing behavioral differences or compatibility issues. Align all jobs to use the same versions (recommend v6 for both).

Also applies to: 44-44, 98-98, 102-102, 151-151, 155-155

🧹 Nitpick comments (4)
.github/workflows/create-release.yaml (2)

108-109: Consider excluding pre-release versions from the latest tag.

The tag generation always includes latest, regardless of pre-release suffixes (e.g., v1.0.0-rc1). Container registries typically reserve latest for stable releases. Pre-release versions should either omit the latest tag or use a distinct strategy (e.g., latest-rc).

# Pseudocode approach:
if version contains pre-release suffix (-alpha, -beta, -rc):
  TAGS = "v${MAJOR},v${MAJOR}.${MINOR},${VERSION_TAG}"  # Omit "latest"
else:
  TAGS = "latest,v${MAJOR},v${MAJOR}.${MINOR},${VERSION_TAG}"

125-131: Ensure atomicity between tag creation and release.

If the git tag push (line 131) succeeds but the GitHub release creation fails, the release will be missing for that tag. Consider adding error handling or using continue-on-error and validation checks to detect this state.

.github/workflows/build-and-push-images.yaml (2)

119-124: Extract duplicated tag conditions into a reusable step or composite.

Both health-checker (lines 119–124) and load-balancer (lines 172–177) jobs define identical tag metadata logic. Extract this to a reusable composite action or shared workflow to reduce maintenance burden and ensure consistency.

Also applies to: 172-177


17-18: Good addition of PR-based tagging.

Adding pull_request trigger and generating pr-<number> tags (line 122, 175) is a valuable practice for tracking per-PR images and debugging. Ensure related branch protection rules and artifact retention policies accommodate these additional tags.

If you need help configuring artifact retention or cleanup policies for PR-based tags, let me know.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ea5b8f and 1a9920c.

📒 Files selected for processing (2)
  • .github/workflows/build-and-push-images.yaml (6 hunks)
  • .github/workflows/create-release.yaml (1 hunks)
🔇 Additional comments (3)
.github/workflows/create-release.yaml (1)

5-5: Clarify intent of closed event in PR trigger.

The version-check job runs on PR opened, synchronize, and closed events. Running validation on closed PRs seems redundant—consider whether this is intentional (e.g., to warn when VERSION is removed) or if it should be removed.

.github/workflows/build-and-push-images.yaml (2)

57-84: LGTM on parse_tags job logic.

The parse_tags job correctly parses comma-separated input, filters empty values, formats output for docker/metadata-action, and provides a has_custom_tags flag for downstream conditionals. The heredoc pattern for multiline output is idiomatic and correct.


120-121: The concern is invalid — github.event.repository.default_branch is reliably available in pull_request events, and the code already guards against issues with the github.event_name != 'pull_request' condition.

The code at lines 120–121 uses a condition that explicitly excludes pull_request events (github.event_name != 'pull_request'), so these tags only execute when on the default branch AND not in a pull_request event context. The property github.event.repository.default_branch is available across all event contexts including pull_request events when the repository object is present in the event payload. No changes are needed.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/build-and-push-images.yaml (1)

238-280: Based on my verification, I can now provide the rewritten review comment:


Action version inconsistency between health-checker and load-balancer jobs requires synchronization.

The health-checker job uses older action versions (checkout@v4, setup-go@v5, build-push-action@v5) while the load-balancer job uses newer versions (checkout@v6, setup-go@v6, build-push-action@v6). This inconsistency creates maintenance burden and potential security gaps.

Upgrading to v6 versions introduces breaking changes that require careful validation:

  • actions/checkout@v6: Persisted credentials now stored in a file instead of git config; requires runner v2.329.0+
  • actions/setup-go@v6: Node runtime upgraded to Node 24; requires runner v2.327.1+; toolchain selection behavior changed
  • docker/build-push-action@v6: Git context behavior clarified; may require docker/setup-buildx-action for full feature support

Update the health-checker job to match load-balancer versions:

     - name: Checkout code
       id: checkout
-      uses: actions/checkout@v4
+      uses: actions/checkout@v6

     - name: Set up Go
       id: setup_go
-      uses: actions/setup-go@v5
+      uses: actions/setup-go@v6
       with:
         go-version: "1.25"

     - name: Build and push health-checker image
       id: container_image_hc
-      uses: docker/build-push-action@v5
+      uses: docker/build-push-action@v6

After upgrading, verify that both builds succeed and that runner environments meet minimum version requirements (v2.329.0+).

🧹 Nitpick comments (4)
.github/workflows/create-release.yaml (2)

59-100: Duplicate version_compare function with build-and-push-images.yaml.

The version_compare function (lines 60-100) is identical to the one in build-and-push-images.yaml (lines 88-128). This duplication increases maintenance burden and risks inconsistency.

Extract the version_compare function into a reusable composite action at .github/actions/compare-versions/action.yaml and invoke it from both workflows. Alternatively, consolidate the version validation logic by having one workflow call the other or extracting a shared shell script.

This addresses the prior review comment flagging this duplication.


165-171: Consider adding explicit error context for git tag operations.

The git tag creation may collide if the tag already exists (though validate-version mitigates this). Additionally, push failures (network, permissions) will fail the step but could benefit from more explicit error handling.

Optionally add explicit error handling:

-      - name: Create Git Tag
-        run: |
-          git config user.name "github-actions[bot]"
-          git config user.email "github-actions[bot]@users.noreply.github.com"
-          VERSION="${{ needs.validate-version.outputs.version }}"
-          git tag -a "$VERSION" -m "Release $VERSION"
-          git push origin "$VERSION"
+      - name: Create Git Tag
+        run: |
+          git config user.name "github-actions[bot]"
+          git config user.email "github-actions[bot]@users.noreply.github.com"
+          VERSION="${{ needs.validate-version.outputs.version }}"
+          if git rev-parse "$VERSION" >/dev/null 2>&1; then
+            echo "❌ Tag $VERSION already exists"
+            exit 1
+          fi
+          git tag -a "$VERSION" -m "Release $VERSION"
+          git push origin "$VERSION" || { echo "❌ Failed to push tag"; exit 1; }
.github/workflows/build-and-push-images.yaml (2)

57-196: Duplicate version_compare function with create-release.yaml.

The version_compare function (lines 88-128) duplicates the identical function in create-release.yaml (lines 60-100). This increases maintenance burden and risks divergence.

Extract version_compare into a reusable composite action (.github/actions/compare-versions/action.yaml) and invoke it from both workflows to consolidate the logic.


230-230: Simplify complex job conditions for readability.

The job conditions at lines 230 and 284 are logically correct but difficult to parse:

if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)

This evaluates to: "Run for push/workflow_dispatch/PR, but exclude fork PRs."

Extract this into a named expression or add an inline comment for clarity:

  health-checker:
    name: Build health-checker image
    runs-on: ubuntu-latest
-   if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
+   if: |
+     (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request')
+     && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
+   # Runs on: push to any branch, workflow_dispatch, PRs from this repo (excludes forks)

Also applies to: 284-284

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 28ce905 and 830cd2c.

📒 Files selected for processing (3)
  • .github/workflows/build-and-push-images.yaml (6 hunks)
  • .github/workflows/create-release.yaml (1 hunks)
  • VERSION (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • VERSION
🔇 Additional comments (1)
.github/workflows/build-and-push-images.yaml (1)

261-266: Docker metadata tags are well‐structured and correctly conditional.

The tag generation logic properly gates production tags (latest, sha) to main branch pushes, enables PR-specific tags for pull requests, and integrates parsed custom tags. This supports the multi-environment workflow correctly.

Also applies to: 316-320

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/build-and-push-images.yaml (1)

230-230: PR entry point conditions are correct but verbose.

The if conditions on the job-level gates (lines 230 and 284) correctly allow push, workflow_dispatch, and non-fork PR events. The logic is sound but could be refactored for clarity. Consider defining an output in the setup job or using a consistent shorthand to reduce repetition.

Also applies to: 284-284

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 830cd2c and 19890ea.

📒 Files selected for processing (2)
  • .github/workflows/build-and-push-images.yaml (8 hunks)
  • .github/workflows/create-release.yaml (1 hunks)
🔇 Additional comments (5)
.github/workflows/create-release.yaml (2)

132-161: Tag generation strategy is sound.

The branching logic correctly handles pre-releases (version-tag only) vs regular releases (latest + major + major.minor + version-tag). This ensures pre-releases don't override the latest tag.


193-206: Workflow dispatch correctly passes tags to downstream workflow.

The dispatch to build-and-push-images.yaml correctly passes the computed tags output as a comma-separated string, which parse_tags job in the downstream workflow expects. Format is correct.

.github/workflows/build-and-push-images.yaml (3)

198-225: Parse tags job cleanly handles custom tag input.

The job correctly parses comma-separated tags from workflow_dispatch inputs and converts them to the multiline format expected by docker/metadata-action. The has_custom_tags flag enables downstream conditionals. Implementation is clean and correct.


261-266: Tag strategy correctly handles PR vs. main-branch contexts.

Both image jobs now properly:

  • Apply latest and sha tags only when on default branch and not a PR (conditional enable logic)
  • Add PR-specific pr-<number> tags for pull request contexts
  • Respect custom tags from parse_tags when present
  • Fall back to branch-based tags for workflow_dispatch on non-default branches

This ensures PRs don't pollute the latest tag and provides clear version separation.

Also applies to: 315-320


258-258: I'll help you verify this review comment about inconsistent Docker action versions. Let me start by examining the workflow file to check the actual versions at the specified lines.
<function_calls>

First, let's find and examine the build-and-push-images.yaml file

find . -name "build-and-push-images.yaml" -type f


</function_calls>
<function_calls>

Get line count to understand file size

wc -l .github/workflows/build-and-push-images.yaml


</function_calls>
<function_calls>

Read the specific lines mentioned in the review (258, 273, 312, 327)

Let's look at a range around these lines to get context

cat -n .github/workflows/build-and-push-images.yaml | sed -n '250,270p'
echo "---"
cat -n .github/workflows/build-and-push-images.yaml | sed -n '268,285p'
echo "---"
cat -n .github/workflows/build-and-push-images.yaml | sed -n '305,335p'


</function_calls>

Now let me search for all docker/build-push-action references to get a complete picture:
<function_calls>

Search for all docker/build-push-action references with line numbers

rg -n "docker/build-push-action" .github/workflows/build-and-push-images.yaml


</function_calls>

Let me also check for docker/metadata-action references:
<function_calls>

Search for all docker/metadata-action references

rg -n "docker/metadata-action" .github/workflows/build-and-push-images.yaml


</function_calls>

<function_calls>

Let's get a broader view of the file to understand job structure

cat -n .github/workflows/build-and-push-images.yaml | head -100


</function_calls>

Let me get a better view by examining the entire workflow file structure:
<function_calls>

Read the entire file to understand the structure

cat .github/workflows/build-and-push-images.yaml


</function_calls>

Now let me search for information about breaking changes between docker/build-push-action v5 and v6:
<function_calls>


docker/build-push-action v5 vs v6 breaking changes


</function_calls>

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
.github/workflows/create-release.yaml (1)

14-132: Version validation workflow is well-structured.

The validate_version job properly orchestrates the validation sequence: file presence → format → semantic version enforcement → comparison with latest release. The conditional use of the new compare_versions action is appropriate, and tag generation logic correctly distinguishes between prerelease (single tag) and stable releases (multiple tags including latest).

Note: Past reviews flagged duplicate version validation logic between create-release.yaml and build-and-push-images.yaml. This PR introduces additional duplication in the build-and-push-images workflow; consider consolidating this shared logic into a reusable action (e.g., .github/actions/validate-version/) to eliminate maintenance burden.

.github/workflows/build-and-push-images.yaml (1)

139-162: Duplicate semantic version validation logic.

This block duplicates the exact same regex validation that exists in create-release.yaml (lines 52-56). Extract this shared logic into .github/actions/validate-version/action.yaml to improve maintainability and reduce drift.

Example structure:

# .github/actions/validate-version/action.yaml
inputs:
  version:
    description: "Version string to validate"
    required: true
outputs:
  valid:
    value: ${{ steps.validate.outputs.valid }}
runs:
  using: composite
  steps:
    - name: Validate format
      id: validate
      shell: bash
      run: |
        VERSION="${{ inputs.version }}"
        # ... regex validation logic here
        echo "valid=true" >> $GITHUB_OUTPUT

Then call it from both workflows:

- uses: ./.github/actions/validate-version
  with:
    version: ${{ env.VERSION }}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 19890ea and f16b0b2.

📒 Files selected for processing (3)
  • .github/actions/compare_versions/action.yaml (1 hunks)
  • .github/workflows/build-and-push-images.yaml (8 hunks)
  • .github/workflows/create-release.yaml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/build-and-push-images.yaml

107-107: property "check_version_file_updated_and_greater" is not defined in object type {}

(expression)


107-107: property "check_version_file_updated_and_greater" is not defined in object type {}

(expression)


111-111: property "check_version_file_updated_and_greater" is not defined in object type {}

(expression)


112-112: property "check_version_file_updated_and_greater" is not defined in object type {}

(expression)


116-116: property "check_version_file_updated_and_greater" is not defined in object type {compare_pr_main_version: {conclusion: string; outcome: string; outputs: {exit_code: string; result: string}}}

(expression)

🔇 Additional comments (4)
.github/actions/compare_versions/action.yaml (1)

1-93: Semantic version comparison logic is solid.

The action correctly normalizes versions by stripping the v-prefix and prerelease/build metadata before numeric comparison of major.minor.patch components. Output formatting for both symbolic (gt/lt/eq) and numeric exit codes is well-handled.

One minor note: the function assumes well-formed semantic versions (X.Y.Z) after cleanup, which is reasonable given upstream validation, but be aware that malformed versions (e.g., missing patch number) will fail silently with empty string comparisons.

.github/workflows/build-and-push-images.yaml (3)

169-196: Tag parsing logic handles workflow_dispatch inputs correctly.

The parse_tags job properly converts comma-separated tag input into the multiline format expected by docker/metadata-action. The has_custom_tags flag enables conditional tag handling downstream.


198-240: PR tagging implementation is well-designed.

The conditional tag logic correctly:

  • Restricts latest and sha tags to non-PR main-branch builds only
  • Applies pr-<number> tags exclusively to PR events
  • Includes custom tags when provided via workflow_dispatch
  • Maintains branch-ref fallback for dispatch events

The job dependency on check_version and parse_tags ensures version validation runs before image builds, and the needs declaration is correct (though depends on fixing the missing step ID in check_version).

Verify that docker/metadata-action@v5 and docker/build-push-action@v6 are compatible with your existing setup and support all the conditional tag syntax used here (particularly the enable flags with expressions).


84-104: I'll verify the critical issue about the missing step ID in the workflow file. Let me start by examining the actual file.
<function_calls>

wc -l .github/workflows/build-and-push-images.yaml

</function_calls>
<function_calls>

sed -n '74,120p' .github/workflows/build-and-push-images.yaml

</function_calls>

I need to see a broader context around the file to understand the structure. Let me check the entire check_version job:
<function_calls>

cat -n .github/workflows/build-and-push-images.yaml | sed -n '50,170p'

</function_calls>

<shell_result>
50 check_version:
51 runs-on: ubuntu-latest
52 if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
53 outputs:
54 pr_version: ${{ steps.check_version_file_updated_and_greater.outputs.pr_version }}
55 main_version: ${{ steps.check_version_file_updated_and_greater.outputs.main_version }}
56 steps:
57 - uses: actions/checkout@v4
58 with:
59 fetch-depth: 0
60 - name: Fetch main branch
61 run: git fetch origin main:main-branch
62 - name: Check VERSION file exists in PR
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
id: check_version_file_exists
run: |
if [ -f "VERSION" ]; then
echo "✅ VERSION file exists in PR"
echo "file_exists=true" >> "$GITHUB_OUTPUT"
else
echo "❌ VERSION file does not exist"
echo "file_exists=false" >> "$GITHUB_OUTPUT"
exit 1
fi
- name: Check VERSION file updated and greater
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
run: |


Let me continue reading to see the complete step definition:
<function_calls>
<invoke name="shell">
<parameter name="command">cat -n .github/workflows/build-and-push-images.yaml | sed -n '80,115p'</parameter>
</invoke>
</function_calls>

<shell_result>
    80	      - name: Check VERSION file updated and greater
    80	      - name: Check VERSION file updated and greater
    81	        if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
        run: |
          if [ -f "main-branch/VERSION" ]; then
            PR_VERSION=$(cat VERSION | xargs)
            MAIN_VERSION=$(cat main-branch/VERSION | xargs)

            # Check if versions are the same
            if [ "$PR_VERSION" == "$MAIN_VERSION" ]; then
              echo "❌ VERSION file has not been updated"
              echo "Current VERSION: $PR_VERSION"
              echo "Main branch VERSION: $MAIN_VERSION"
              echo "Please update the VERSION file with a new semantic version"
              exit 1
            fi

            echo "PR_VERSION=$PR_VERSION" >> "$GITHUB_OUTPUT"
            echo "MAIN_VERSION=$MAIN_VERSION" >> "$GITHUB_OUTPUT"
          else
            echo "✅ VERSION file is new (not present in main branch)"
          fi

Let me get a cleaner view without the duplicated line:
<function_calls>

cat -n .github/workflows/build-and-push-images.yaml | sed -n '76,125p'

</function_calls>

<shell_result>
76 - name: Check VERSION file exists in PR
77 if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
id: check_version_file_exists
run: |
if [ -f "VERSION" ]; then
echo "✅ VERSION file exists in PR"
echo "file_exists=true" >> "$GITHUB_OUTPUT"
else
echo "❌ VERSION file does not exist"
echo "file_exists=false" >> "$GITHUB_OUTPUT"
exit 1
fi
- name: Check VERSION file updated and greater
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
id: check_version_file_updated_and_greater
run: |
if [ -f "main-branch/VERSION" ]; then
PR_VERSION=$(cat VERSION | xargs)
MAIN_VERSION=$(cat main-branch/VERSION | xargs)

        # Check if versions are the same
        if [ "$PR_VERSION" == "$MAIN_VERSION" ]; then
          echo "❌ VERSION file has not been updated"
          echo "Current VERSION: $PR_VERSION"
          echo "Main branch VERSION: $MAIN_VERSION"
          echo "Please update the VERSION file with a new semantic version"
          exit 1
        fi

        echo "PR_VERSION=$PR_VERSION" >> "$GITHUB_OUTPUT"
        echo "MAIN_VERSION=$MAIN_VERSION" >> "$GITHUB_OUTPUT"
      else
        echo "✅ VERSION file is new (not present in main branch)"
      fi

Perfect! Now let me verify the outputs section where the step ID is referenced:
<function_calls>
<invoke name="shell">
<parameter name="command">cat -n .github/workflows/build-and-push-images.yaml | sed -n '50,56p'</parameter>
</invoke>
</function_calls>

<shell_result>
    50	  check_version:
    51	    runs-on: ubuntu-latest
    52	    if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
    53	    outputs:
    54	      pr_version: ${{ steps.check_version_file_updated_and_greater.outputs.pr_version }}
    55	      main_version: ${{ steps.check_version_file_updated_and_greater.outputs.main_version }}
    56	    steps:

Now let me check if there are any other references to this step ID further down in the file:
<function_calls>

grep -n "check_version_file_updated_and_greater" .github/workflows/build-and-push-images.yaml

</function_calls>

<shell_result>
54 pr_version: ${{ steps.check_version_file_updated_and_greater.outputs.pr_version }}
55 main_version: ${{ steps.check_version_file_updated_and_greater.outputs.main_version }}
92 - name: Check VERSION file updated and greater
92 id: check_version_file_updated_and_greater




**The review comment is incorrect—the step ID is already present in the workflow file.**

The step "Check VERSION file updated and greater" at line 92 already contains `id: check_version_file_updated_and_greater`. The job outputs (lines 54-55) correctly reference this step ID to access its outputs. The critical issue flagged in the review does not exist in the current codebase.

The code snippet shown in the review comment (lines 84-104) does not match the actual file content, which includes the step ID at line 92.

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.github/workflows/create-release.yaml (1)

151-161: Whitespace inconsistency in git config.

Line 153 has inconsistent indentation: git config user.name is indented with a space character after the pipe, which may cause shell interpretation issues. Use consistent 2-space indentation.

      - name: Create Git Tag
        run: |
-        git config user.name "github-actions[bot]"
+         git config user.name "github-actions[bot]"
-        git config user.email "github-actions[bot]@users.noreply.github.com"
+         git config user.email "github-actions[bot]@users.noreply.github.com"
-        VERSION="${{ needs.validate_version.outputs.version }}"
+         VERSION="${{ needs.validate_version.outputs.version }}"
.github/workflows/build-and-push-images.yaml (1)

245-245: Inconsistent docker/build-push-action versions.

The health-checker job (line 245) uses docker/build-push-action@v5, while the load-balancer job (line 300) uses docker/build-push-action@v6. For consistency and to benefit from security updates and bug fixes, both should use the same version.

Update line 245 to match:

      - name: Build and push health-checker image
        id: container_image_hc
-       uses: docker/build-push-action@v5
+       uses: docker/build-push-action@v6

Also applies to: 300-300

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f16b0b2 and 95276d0.

📒 Files selected for processing (2)
  • .github/workflows/build-and-push-images.yaml (8 hunks)
  • .github/workflows/create-release.yaml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/build-and-push-images.yaml

107-107: property "check_version_file_updated_and_greater" is not defined in object type {}

(expression)


107-107: property "check_version_file_updated_and_greater" is not defined in object type {}

(expression)


111-111: property "check_version_file_updated_and_greater" is not defined in object type {}

(expression)


112-112: property "check_version_file_updated_and_greater" is not defined in object type {}

(expression)


116-116: property "check_version_file_updated_and_greater" is not defined in object type {compare_pr_main_version: {conclusion: string; outcome: string; outputs: {exit_code: string; result: string}}}

(expression)

🔇 Additional comments (5)
.github/workflows/build-and-push-images.yaml (4)

169-196: Parse tags logic is well-implemented.

The parse_tags job correctly handles comma-separated tag inputs, trims whitespace, and formats output for docker/metadata-action consumption. The conditional logic and heredoc approach are appropriate.


234-238: PR-specific tagging is well-structured.

The conditional tagging logic properly distinguishes between main branch, PR, and workflow_dispatch scenarios. PR-specific tags (pr-<PR-number>) are correctly enabled only for pull_request events, and custom tags from parse_tags are appropriately integrated.


1-10: Workflow trigger configuration properly documented.

The workflow now triggers on pull_request (lines 17-18) with types opened and synchronize, enabling PR-context version checks. The workflow_dispatch input description clearly explains the comma-separated tag format with helpful examples.


57-168: PR-version validation is comprehensively gated.

The check_version job properly restricts VERSION validation to internal PRs (lines 62, 68, 75, 85) using fork detection (github.event.pull_request.head.repo.full_name == github.repository), ensuring workflows from forks skip validation. The validation sequence (existence → updated → comparison → format) is logical and provides clear error messages.

.github/workflows/create-release.yaml (1)

36-57: Missing step ID breaks subsequent references.

To use outputs in steps, your step needs to have an id and be referenced in the context of steps inside the job. Line 36 ("Read and validate VERSION") is missing an id attribute, but lines 67, 100, and 108 reference its outputs via steps.read_version.outputs.*. This will cause a workflow execution failure.

Add an id to the step:

      - name: Read and validate VERSION
+       id: read_version
        shell: bash
        run: |

Likely an incorrect or invalid review comment.

@sanbotto sanbotto merged commit 29aab3d into main Nov 26, 2025
7 checks passed
@sanbotto sanbotto deleted the feat/add-release-workflow branch November 26, 2025 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants