Skip to content

Conversation

@jasquat
Copy link
Contributor

@jasquat jasquat commented Dec 4, 2025

Summary by CodeRabbit

  • Chores
    • Refined internal build and test workflows for improved consistency and reliability

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

📝 Walkthrough

Walkthrough

GitHub Actions workflows are updated to normalize branch names for Docker image tagging, reformat workflow steps for consistency, and improve bash variable handling for environment variable redirection.

Changes

Cohort / File(s) Summary
Docker branch name normalization
\.github/workflows/build_docker_images\.yml
Introduced a new step to normalize branch names (lowercased, hyphen-separated) and replaced all BRANCH_NAME references with normalized_branch_name for versioning and tagging. Removed api-logs from on.push.branches trigger list.
Workflow configuration updates
\.github/workflows/common\.yml
Reindented workflow steps under the job's steps section and renamed the GitHub Publish step input parameter from username to user.
Bash safety improvement
\.github/workflows/e2e-tests\.yml
Added quotes around GITHUB_OUTPUT variable in redirection operator to ensure proper expansion with spaces or special characters in the path.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

  • Specific areas requiring attention:
    • Verify the branch name normalization logic handles edge cases (e.g., underscores, dots, slashes in branch names)
    • Confirm all downstream processes that consume the normalized_branch_name tag work correctly
    • Ensure the username-to-user parameter rename in common.yml aligns with the GitHub Publish action's expected input

Possibly related PRs

  • Fix comment #2180: Modifies Docker metadata and tags generation in build_docker_images.yml related to branch name handling

Suggested reviewers

  • burnettk

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 describes the main changes: normalizing branch names for Docker tags and addressing actionlint concerns across multiple workflow files.
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 fix-branch-name-in-docker-tag

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6198275 and 58b1b67.

📒 Files selected for processing (3)
  • .github/workflows/build_docker_images.yml (3 hunks)
  • .github/workflows/common.yml (1 hunks)
  • .github/workflows/e2e-tests.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (6)
.github/workflows/e2e-tests.yml (1)

18-18: Safety improvement: quoting GITHUB_OUTPUT.

Quoting the GITHUB_OUTPUT variable ensures robust variable expansion even if the path contains spaces or special characters. This is a defensive best practice for shell scripting in GitHub Actions.

.github/workflows/common.yml (2)

19-27: Formatting reflow looks good.

The step indentation and alignment updates are formatting-only changes with no behavioral impact.


32-32: Parameter name user is correct for pypa/gh-action-pypi-publish@release/v1.

The action accepts user as the input parameter name (not username). The default value __token__ enables trusted publishing to PyPI.

.github/workflows/build_docker_images.yml (3)

72-76: Branch name normalization pipeline is well-constructed.

The three-stage normalization correctly:

  1. Converts to lowercase for consistency
  2. Replaces non-alphanumeric sequences with hyphens to sanitize special characters
  3. Strips leading/trailing hyphens to produce valid Docker tag components

Output is properly quoted for safety, and the step id is clear for downstream references.


91-91: Normalized branch name is correctly propagated to image versioning and tagging.

Both the Docker metadata label (line 91) and the full image tag generation (line 105) properly reference steps.normalize_branch_name.outputs.normalized_branch_name with correct step id and output variable names.

Also applies to: 105-105


72-105: All BRANCH_NAME references are properly scoped — no issues found.

The search confirms that BRANCH_NAME is used only as a local shell variable within the "Normalize branch name" step (lines 75–76), where it is computed and immediately output as normalized_branch_name to $GITHUB_OUTPUT. All downstream references correctly use steps.normalize_branch_name.outputs.normalized_branch_name. No stale env.BRANCH_NAME references or improperly scoped variables exist in the workflow.


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 and usage tips.

@jasquat jasquat merged commit 3577864 into main Dec 4, 2025
4 checks passed
@jasquat jasquat deleted the fix-branch-name-in-docker-tag branch December 4, 2025 19:53
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