Skip to content

Conversation

@Dargon789
Copy link
Owner

@Dargon789 Dargon789 commented Oct 26, 2025

Summary by Sourcery

Add a new GitHub Actions workflow under .circleci/docker.yml to automate Docker image building, pushing, and signing with Buildx, caching, and cosign on scheduled and event-driven triggers

New Features:

  • Add Docker GitHub Actions workflow to build and push container images to the registry
  • Integrate cosign to sign published images outside of pull requests

Enhancements:

  • Use Docker Buildx for multi-platform builds with GitHub Actions cache
  • Extract and apply Docker metadata (tags and labels) via docker/metadata-action

CI:

  • Trigger the Docker workflow on a daily cron, master branch pushes, pull requests, and semver tag creations

Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
@codesandbox
Copy link

codesandbox bot commented Oct 26, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel
Copy link

vercel bot commented Oct 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
interface-web Ready Ready Preview Comment Oct 26, 2025 3:47pm

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 26, 2025

Reviewer's Guide

Adds a GitHub Actions workflow to automate building, caching, pushing, and cosign-signing Docker images on a schedule, master pushes, and pull requests.

Sequence diagram for Docker image build and publish workflow

sequenceDiagram
  participant Dev as Developer
  participant GitHub as "GitHub Actions Workflow"
  participant Docker as "Docker Buildx"
  participant Registry as "Docker Registry (ghcr.io)"
  participant Cosign as "Cosign"
  Dev->>GitHub: Push/PR/Schedule triggers workflow
  GitHub->>GitHub: Checkout repository
  GitHub->>Docker: Build Docker image
  GitHub->>GitHub: Extract Docker metadata
  GitHub->>Docker: Build and push Docker image
  Docker->>Registry: Push image (if not PR)
  GitHub->>Cosign: Sign image (if not PR)
  Cosign->>Registry: Store signed image
Loading

Flow diagram for Docker image build and sign process

flowchart TD
  Start(["Workflow Triggered (push/schedule/PR)"]) --> Checkout["Checkout Repository"]
  Checkout --> Buildx["Set up Docker Buildx"]
  Buildx --> Build["Build Docker Image"]
  Build --> Metadata["Extract Docker Metadata"]
  Metadata --> Push["Build and Push Docker Image"]
  Push -->|if not PR| Sign["Sign Docker Image with Cosign"]
  Push --> Registry["Docker Registry (ghcr.io)"]
  Sign --> Registry
Loading

File-Level Changes

Change Details Files
Introduce new Docker CI workflow
  • Define triggers for schedule, push on master, and pull_request
  • Set global REGISTRY and IMAGE_NAME environment variables
.circleci/docker.yml
Configure Docker build and push steps
  • Checkout repository and conditionally install cosign on non-PRs
  • Set up Buildx builder and login to registry when not in PR
  • Extract image metadata and build/push with cache-from/to GHA
.circleci/docker.yml
Add cosign signing for published images
  • Use id-token to provision ephemeral certificate
  • Sign the image digest with cosign for non-PR workflows
.circleci/docker.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@snyk-io
Copy link

snyk-io bot commented Oct 26, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@gemini-code-assist
Copy link

Summary of Changes

Hello @Dargon789, 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 introduces a new GitHub Actions workflow to streamline the Docker image lifecycle. The workflow automates the building, pushing to GitHub Container Registry, and cryptographic signing of Docker images, significantly enhancing the project's CI/CD pipeline and supply chain security. It is configured to run on various events, including scheduled intervals, pushes to the main branch, and pull requests. However, a notable YAML syntax error in the job definition will require correction for the workflow to function correctly.

Highlights

  • New GitHub Actions Workflow: Introduces a new GitHub Actions workflow (.circleci/docker.yml) designed to automate the build, push, and signing processes for Docker images.
  • Automated Image Management: Configures the workflow to trigger on scheduled events, pushes to the master branch, and creation of semantic version tags, as well as pull requests targeting master.
  • Supply Chain Security: Implements image signing using cosign to enhance supply chain security for published Docker images, ensuring their authenticity and integrity.
  • Workflow Syntax Issue: Identified a critical YAML syntax error within the build job definition, where runs-on, permissions, and steps are incorrectly indented and structured, which will prevent the workflow from executing as intended.
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.

@cloudflare-workers-and-pages
Copy link

Deploying uniswap with  Cloudflare Pages  Cloudflare Pages

Latest commit: 60c578d
Status: ✅  Deploy successful!
Preview URL: https://74bc9b60.uniswap-omj.pages.dev
Branch Preview URL: https://dargon789-patch-2.uniswap-omj.pages.dev

View logs

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and found some issues that need to be addressed.

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `.circleci/docker.yml:26-28` </location>
<code_context>
+
+
+jobs:
+  build:
+    - name: Build the Docker image
+      run: docker build . --file path/to/Dockerfile --tag my-image-name:$(date +%s)
+
+  runs-on: ubuntu-latest
</code_context>

<issue_to_address>
**issue (bug_risk):** The 'build' job is not properly structured for GitHub Actions workflow syntax.

The job uses CircleCI syntax instead of the required GitHub Actions format, which should include 'runs-on' and 'steps'. This mismatch will likely prevent the workflow from running correctly.
</issue_to_address>

### Comment 2
<location> `.circleci/docker.yml:30` </location>
<code_context>
+    - name: Build the Docker image
+      run: docker build . --file path/to/Dockerfile --tag my-image-name:$(date +%s)
+
+  runs-on: ubuntu-latest
+   permissions:
+      contents: read
</code_context>

<issue_to_address>
**issue (bug_risk):** The 'runs-on' key is incorrectly indented and placed outside of a job definition.

This placement will cause a workflow syntax error, as 'runs-on' must be inside a job definition.
</issue_to_address>

### Comment 3
<location> `.circleci/docker.yml:100` </location>
<code_context>
+          DIGEST: ${{ steps.build-and-push.outputs.digest }}
+        # This step uses the identity token to provision an ephemeral certificate
+        # against the sigstore community Fulcio instance.
+        run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
</code_context>

<issue_to_address>
**suggestion:** The signing step uses xargs to sign multiple tags, which may not handle empty or malformed TAGS gracefully.

Add validation to ensure TAGS is not empty and contains valid values before running the signing command.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

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 adds a new GitHub Actions workflow for building and pushing Docker images. The workflow is well-structured with steps for building, pushing, and signing images. However, there are a few critical issues that will prevent it from running correctly.

First, the workflow file is located in .circleci/docker.yml. GitHub Actions will only discover workflows in the .github/workflows directory, so the file needs to be moved for it to be executed.

Second, the YAML syntax for the jobs section is incorrect. The runs-on, permissions, and steps need to be properly nested under the build job.

Third, the build-push-action is missing the path to the Dockerfile, which will likely cause the build to fail.

I've also included some suggestions to improve security by pinning actions to commit SHAs and to update some of the tools to their latest versions. Please see the detailed comments for specific suggestions.

@Dargon789 Dargon789 merged commit 7f595cd into main Oct 26, 2025
15 of 17 checks passed
@Dargon789 Dargon789 deleted the Dargon789-patch-2 branch October 26, 2025 15:54
@Dargon789 Dargon789 linked an issue Nov 13, 2025 that may be closed by this pull request
@Dargon789 Dargon789 linked an issue Jan 19, 2026 that may be closed by this pull request
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.

#Docker image build and sign process in CI [vc]: #Uniswap:main

2 participants