Skip to content

feat: Refactor GitHub Actions workflows to use a reusable Docker build/push workflow#1039

Open
rapoler wants to merge 1 commit intodevelopfrom
workflows
Open

feat: Refactor GitHub Actions workflows to use a reusable Docker build/push workflow#1039
rapoler wants to merge 1 commit intodevelopfrom
workflows

Conversation

@rapoler
Copy link
Copy Markdown
Contributor

@rapoler rapoler commented Mar 10, 2026

Summary by CodeRabbit

  • Chores
    • Streamlined the release workflow by integrating a centralized, reusable Docker build and push process, improving CI/CD efficiency and maintainability.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 10, 2026

📝 Walkthrough

Walkthrough

The pull request replaces inline Docker build and push steps in the studio releaser workflow with a call to a centralized, reusable docker-build-push workflow. The change removes checkout, environment setup, and Docker login operations in favor of delegated workflow execution.

Changes

Cohort / File(s) Summary
Workflow Refactoring
.github/workflows/studio-releaser.yml
Replaces inline Docker build/push steps with a reusable workflow invocation from factly/gopie-ee/.github/workflows/docker-build-push.yaml@develop. Adds permissions block for OIDC token generation. Retains studio context and Dockerfile.prod configuration with tag substitution via github.ref_name.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops through workflows with glee,
Docker steps now central, not scattered about!
Reusable pathways make maintenance spree,
One source of truth, no more running about.
Thump thump goes the heart of efficiency! 🚀

🚥 Pre-merge checks | ✅ 3
✅ 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 change: refactoring GitHub Actions workflows to use a reusable Docker build/push workflow, which is exactly what the .github/workflows/studio-releaser.yml changes demonstrate.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch workflows

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.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying dega-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 04804e1
Status: ✅  Deploy successful!
Preview URL: https://c2fa8759.dega-docs.pages.dev
Branch Preview URL: https://workflows.dega-docs.pages.dev

View logs

Copy link
Copy Markdown

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/studio-releaser.yml:
- Line 9: The reusable workflow reference "uses:
factly/gopie-ee/.github/workflows/docker-build-push.yaml@develop" is pinned to a
mutable branch; replace the `@develop` suffix with an immutable ref (a release tag
or a specific commit SHA) so the workflow is reproducible and cannot change
unexpectedly—update the "uses" line to point to a stable tag (e.g., `@vX.Y.Z`) or
a commit SHA instead of `@develop`.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6f99e2eb-fc28-42e5-b710-e202afea538e

📥 Commits

Reviewing files that changed from the base of the PR and between 2276488 and 04804e1.

📒 Files selected for processing (1)
  • .github/workflows/studio-releaser.yml

tags: factly/dega-studio:${{ env.RELEASE_VERSION }}
context: studio
file: studio/Dockerfile.prod No newline at end of file
uses: factly/gopie-ee/.github/workflows/docker-build-push.yaml@develop
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Pin the reusable workflow to an immutable ref.

Line 9 uses @develop, so release behavior can drift with future changes in factly/gopie-ee and break reproducibility. For a release pipeline, this should be pinned to a version tag or commit SHA instead.

Suggested change
-    uses: factly/gopie-ee/.github/workflows/docker-build-push.yaml@develop
+    uses: factly/gopie-ee/.github/workflows/docker-build-push.yaml@<immutable-tag-or-commit-sha>
📝 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
uses: factly/gopie-ee/.github/workflows/docker-build-push.yaml@develop
uses: factly/gopie-ee/.github/workflows/docker-build-push.yaml@v1.2.3
Suggested change
uses: factly/gopie-ee/.github/workflows/docker-build-push.yaml@develop
uses: factly/gopie-ee/.github/workflows/docker-build-push.yaml@abc123def456
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/studio-releaser.yml at line 9, The reusable workflow
reference "uses:
factly/gopie-ee/.github/workflows/docker-build-push.yaml@develop" is pinned to a
mutable branch; replace the `@develop` suffix with an immutable ref (a release tag
or a specific commit SHA) so the workflow is reproducible and cannot change
unexpectedly—update the "uses" line to point to a stable tag (e.g., `@vX.Y.Z`) or
a commit SHA instead of `@develop`.

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.

1 participant