Skip to content

chore: Add quay.io to release pipeline - #101

Merged
danielpanzella merged 3 commits into
mainfrom
danielpanzella/push-images-to-quay
Oct 16, 2025
Merged

chore: Add quay.io to release pipeline#101
danielpanzella merged 3 commits into
mainfrom
danielpanzella/push-images-to-quay

Conversation

@danielpanzella

@danielpanzella danielpanzella commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Release workflow updated to publish container images to both Docker Hub and Quay.io, tag releases with semantic versions (full and major.minor) alongside latest, and ensure registry authentication for reliable multi-registry distribution.

@coderabbitai

coderabbitai Bot commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Adds quay.io authentication and new steps in the release workflow to build/push the wandb/controller:latest image and then tag and push versioned images to both Docker Hub and Quay.io using release-derived tags.

Changes

Cohort / File(s) Summary
CI/CD Release Workflow Configuration
\​.github/workflows/release.yaml
Adds docker/login-action@v2 step to authenticate with quay.io. Renames the build step to "Build and Push Latest", adds if: new_release_version guard and environment variables IMAGE_TAG_BASE=wandb/controller and VERSION=latest. Adds steps to tag wandb/controller:latest as the release version and push three tags to Docker Hub and three tags to Quay.io (release version, major.minor, and major).

Sequence Diagram(s)

sequenceDiagram
    participant WF as Release Workflow
    participant Quay as Quay.io
    participant Hub as Docker Hub

    WF->>Quay: Login (docker/login-action@v2)
    activate Quay
    Quay-->>WF: Auth OK
    deactivate Quay

    WF->>WF: Build & Push Latest\n(IMAGE_TAG_BASE=wandb/controller, VERSION=latest)

    rect rgba(100,200,150,0.12)
    note right of WF: Tag latest as versioned tags
    WF->>Hub: Tag & Push\n(new_release_version, major.minor, major)
    Hub-->>WF: Push OK
    end

    rect rgba(150,180,220,0.12)
    note right of WF: Mirror tags to Quay.io
    WF->>Quay: Tag & Push\n(new_release_version, major.minor, major)
    Quay-->>WF: Push OK
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through CI at break of day,
Tagged latest first, then led the way,
To Hub and Quay the versions flew,
Major, minor, and the whole debut,
A rabbit’s push — quick, tidy, true.

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 pull request title "chore: Add quay.io to release pipeline" is directly related to the main changes in the changeset. The modifications to .github/workflows/release.yaml primarily focus on integrating quay.io into the release workflow, including adding a quay.io login step and a new "Tag and Push to Quay.io" step. While the changeset also includes related adjustments to Docker Hub tagging logic, the core objective—as evidenced by the PR title, source branch name ("push-images-to-quay"), and the nature of the changes—is to enable quay.io as a registry in the release pipeline. The title is concise, specific, uses conventional commit formatting, and clearly communicates the primary change without noise or vagueness.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch danielpanzella/push-images-to-quay

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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/release.yaml (1)

67-77: <!-- [scratchpad]
[task verify_semantic_release_output_behavior_complete]

[observations]

  • cycjimmy/semantic-release-action outputs: when no release detected, new_release_* outputs are empty/undefined, new_release_published="false"
  • GitHub Actions conditionals: undefined/null/empty string all evaluate as falsy
  • The proposed condition if: steps.release.outputs.new_release_version correctly handles this case (will skip when empty)
  • Current workflow has TWO tagging steps without the condition: Docker Hub (lines 67-77) AND Quay.io (lines 79-88)

[analysis]

  • Review comment correctly identifies the risk: semantic-release outputs will be empty/undefined when no version bump
  • The condition syntax is valid and appropriate
  • Both tagging steps are vulnerable; the comment focuses on Docker Hub but Quay.io has the same issue
  • Without the condition, docker commands will run with empty variables, creating malformed tags

[done]

  • Verified semantic-release behavior: outputs are empty/undefined when no release
  • Verified GitHub Actions conditional coercion: treats empty/undefined as falsy
  • Confirmed both tagging steps lack the necessary condition
  • The issue is real and the fix is appropriate

Add condition to both Docker tagging steps to prevent failures when semantic-release doesn't produce a new version.

The review comment is accurate. When semantic-release detects no version bump (e.g., non-conventional commit messages), new_release_* outputs remain empty/undefined. GitHub Actions treats these as falsy, so without a conditional, the docker tag and docker push commands will execute with empty variables, creating invalid tags.

The proposed condition if: steps.release.outputs.new_release_version is sound—it will correctly skip the step when the output is empty. However, this fix must be applied to both the "Tag and Push to Docker Hub" step (lines 67–77) and the "Tag and Push to Quay.io" step (lines 79–88), as they both reference the same undefined outputs.

      - name: Tag and Push to Docker Hub
+       if: steps.release.outputs.new_release_version
        run: |
          docker tag wandb/controller:latest wandb/controller:${{ steps.release.outputs.new_release_version }}
          docker push wandb/controller:${{ steps.release.outputs.new_release_version }}
          ...

      - name: Tag and Push to Quay.io
+       if: steps.release.outputs.new_release_version
        run: |
          docker tag wandb/controller:latest quay.io/wandb_tools/wandb-k8s-operator:${{ steps.release.outputs.new_release_version }}
          docker push quay.io/wandb_tools/wandb-k8s-operator:${{ steps.release.outputs.new_release_version }}
          ...
🧹 Nitpick comments (1)
.github/workflows/release.yaml (1)

33-38: Update docker/login-action@v2 to @V3 for both Docker Hub and Quay.io logins.

The latest version of docker/login-action is v3.5.0, which offers Node.js 20 runtime support, dependency updates, and improved maintenance. Update both login steps to align with the currently maintained version:

  • Line 28 (Docker Hub): uses: docker/login-action@v3
  • Line 33 (Quay.io): uses: docker/login-action@v3
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5974168 and b8fb32e.

📒 Files selected for processing (1)
  • .github/workflows/release.yaml (3 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/release.yaml

34-34: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ 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). (3)
  • GitHub Check: build-and-scan
  • GitHub Check: Build
  • GitHub Check: Test
🔇 Additional comments (2)
.github/workflows/release.yaml (2)

59-65: Confirm the Build and Push step sets correct variables.

The renamed step now uses IMAGE_TAG_BASE and VERSION environment variables. Verify that the underlying make docker-build docker-push target correctly uses these variables to build the image with the right tag and registry endpoint.


79-88: The review comment's premise is factually incorrect.

The review claims the Docker Hub step already has the conditional guard, but examination of .github/workflows/release.yaml shows that the "Tag and Push to Docker Hub" step (lines 52–62) does NOT have an if condition. Both the Docker Hub and Quay.io steps currently execute unconditionally using semantic-release outputs.

While adding a defensive condition to either or both steps might be a reasonable improvement, the justification in the review comment—"apply the same guard condition" that already exists—is based on a false premise. The guard does not exist in the Docker Hub step.

Likely an incorrect or invalid review comment.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

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

33-38: Update docker/login-action from v2 to v3 for actively maintained version.

Both login steps (lines 28 and 34) use docker/login-action@v2, which is superseded by v3. While v2 remains functional, v3 is the actively maintained version and is referenced in all official documentation. The upgrade is straightforward: change both instances to @v3. Verify your GitHub Actions runners meet the minimum requirement (v2.308.0+) for the Node 20 runtime used by v3. The quay.io registry parameter is fully supported in v3.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b8fb32e and b8db8f7.

📒 Files selected for processing (1)
  • .github/workflows/release.yaml (3 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/release.yaml

34-34: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ 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). (2)
  • GitHub Check: Build
  • GitHub Check: Test
🔇 Additional comments (3)
.github/workflows/release.yaml (3)

59-66: Approved: Build and Push Latest step with proper conditions and environment variables.

The conditional guard on steps.release.outputs.new_release_version ensures this step only runs on actual releases. The environment variables IMAGE_TAG_BASE and VERSION are correctly set to build wandb/controller:latest. The make targets should consume these to produce the correct image tag.


68-78: Approved: Docker Hub tagging and push strategy.

The step correctly tags the built wandb/controller:latest image with three semantic version tags (full version, major.minor, and major) and pushes them to Docker Hub. The conditional ensures this only runs on releases with a new version.


81-91: Approved: Quay.io tagging and push strategy.

The step mirrors the Docker Hub tagging strategy but pushes to quay.io/wandb_tools/wandb-k8s-operator with the same semantic version tags. This ensures consistency across registries. The conditional and tag naming are correct.

@danielpanzella
danielpanzella merged commit a1f440b into main Oct 16, 2025
10 checks passed
@danielpanzella
danielpanzella deleted the danielpanzella/push-images-to-quay branch October 16, 2025 22:07
@jsbroks

jsbroks commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

This PR is included in version 1.21.3 🎉

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.

3 participants