Skip to content

setup image pipeline#30233

Closed
lesongjia wants to merge 1 commit into
langgenius:mainfrom
SyncMind-AI-Solutions:lesong/setup-dify-image-pipeline
Closed

setup image pipeline#30233
lesongjia wants to merge 1 commit into
langgenius:mainfrom
SyncMind-AI-Solutions:lesong/setup-dify-image-pipeline

Conversation

@lesongjia

Copy link
Copy Markdown

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Copilot AI review requested due to automatic review settings December 27, 2025 05:14
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. 🌊 feat:workflow Workflow related stuff. labels Dec 27, 2025
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @lesongjia, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request establishes a new, dedicated image pipeline for SyncMind, enabling the automated building and publishing of Dify Docker images to Alibaba Cloud ACR. The changes introduce the necessary scripts and documentation to streamline the deployment process for dify-api and dify-web images, ensuring consistent and efficient updates to the specified container registry.

Highlights

  • New Image Pipeline for SyncMind: Introduces dedicated automation for building and publishing Dify Docker images specifically for SyncMind.
  • Alibaba Cloud ACR Integration: Configures the pipeline to push dify-api:latest and dify-web:latest images to a specific Alibaba Cloud Container Registry.
  • Automated Build and Push Script: Adds a new shell script (push-acr-latest.sh) to handle the Docker buildx and push operations for the Dify images.
  • GitHub Actions Workflow: Sets up a manual GitHub Actions workflow (syncmind-push-acr.yml) to trigger the image publishing process, requiring specific ACR credentials.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/syncmind-push-acr.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@lesongjia lesongjia closed this Dec 27, 2025
@lesongjia
lesongjia deleted the lesong/setup-dify-image-pipeline branch December 27, 2025 05:15

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request sets up an image pipeline by adding a script and documentation for building and publishing Docker images to Alibaba Cloud ACR. The changes are well-contained within a new syncmind directory. My review focuses on improving code quality and documentation completeness. I've suggested refactoring the build script to remove code duplication, which will improve maintainability. I also pointed out that the documentation references a workflow file that is not included in this PR, which could cause confusion. Overall, these are good additions, and with the suggested improvements, the new pipeline will be more robust and user-friendly.

Comment thread syncmind/README.md

### GitHub Actions

Workflow: `.github/workflows/syncmind-push-acr.yml`

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.

medium

This documentation references the workflow file .github/workflows/syncmind-push-acr.yml, but the file itself is not included in this pull request. This can be confusing for anyone trying to set up or understand the CI/CD pipeline. To make the documentation complete, please either add the workflow file in this PR or add a note indicating that it will be provided in a future change.

Comment on lines +9 to +28
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"

api_image="$REGISTRY/$NAMESPACE/dify-api:$TAG"
web_image="$REGISTRY/$NAMESPACE/dify-web:$TAG"

cd "$root_dir"

docker buildx build \
--platform "$PLATFORM" \
--build-arg "COMMIT_SHA=$(git rev-parse HEAD)" \
-t "$api_image" \
--push \
api

docker buildx build \
--platform "$PLATFORM" \
--build-arg "COMMIT_SHA=$(git rev-parse HEAD)" \
-t "$web_image" \
--push \
web

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.

medium

The script contains duplicated docker buildx build blocks for the api and web images. To improve maintainability and follow the DRY (Don't Repeat Yourself) principle, this logic can be refactored into a reusable function. This will also make it easier to update the build process in the future. Additionally, git rev-parse HEAD is called twice; it can be called once at the start of the script and stored in a variable.

root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
COMMIT_SHA="$(git rev-parse HEAD)"

build_and_push() {
  local context="$1"
  local image_name="$2"
  echo "INFO: Building and pushing $image_name from context $context..."
  docker buildx build \
    --platform "$PLATFORM" \
    --build-arg "COMMIT_SHA=$COMMIT_SHA" \
    -t "$image_name" \
    --push \
    "$context"
}

api_image="$REGISTRY/$NAMESPACE/dify-api:$TAG"
web_image="$REGISTRY/$NAMESPACE/dify-web:$TAG"

cd "$root_dir"

build_and_push "api" "$api_image"
build_and_push "web" "$web_image"

Copilot AI 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.

Pull request overview

This PR sets up infrastructure for building and publishing Dify Docker images to Alibaba Cloud Container Registry (ACR) for the SyncMind project. The implementation provides both automated GitHub Actions workflows and manual local build options.

  • Adds a GitHub Actions workflow for manual image builds and pushes to ACR
  • Provides a bash script for local Docker image building and publishing
  • Includes comprehensive documentation for both automated and manual workflows

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/syncmind-push-acr.yml GitHub Actions workflow that builds and pushes dify-api and dify-web images to Alibaba ACR on manual trigger
syncmind/scripts/push-acr-latest.sh Bash script for local Docker image building and pushing with configurable registry, namespace, and platform settings
syncmind/README.md Documentation explaining the image pipeline setup, including registry details, GitHub Actions configuration, and local usage instructions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lesongjia
lesongjia restored the lesong/setup-dify-image-pipeline branch December 27, 2025 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🌊 feat:workflow Workflow related stuff. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants