Skip to content

Conversation

@Sg312
Copy link
Contributor

@Sg312 Sg312 commented Sep 30, 2025

Summary

Fix docker ci manifest creation sha prefix

Type of Change

  • Bug fix

Testing

n/a

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Summary

This PR simplifies the Docker image tag generation process for ARM64 builds by replacing the external `docker/metadata-action@v5` GitHub Action with a custom bash script. The change specifically affects the ARM64 build job in the Docker images workflow (`.github/workflows/images.yml`), removing the dependency on the metadata action and implementing direct string manipulation to generate the same two tags: `latest-arm64` and `${{ github.sha }}-arm64`.

The modification streamlines the workflow by eliminating the overhead of an external action for a simple tag generation task. Instead of using the metadata action's templating system, the new approach uses a straightforward bash script that constructs the tags directly. This change maintains the same functionality while reducing external dependencies and providing more transparent control over the exact tag format.

The change fits into the broader CI/CD infrastructure of the codebase, which appears to have comprehensive Docker image building workflows for different architectures. This modification specifically targets the ARM64 build process, suggesting the codebase supports multi-architecture Docker deployments.

PR Description Notes:

  • The PR description template sections are not filled out (Summary, Type of Change, Testing, Checklist are all empty)
  • No issue reference is provided despite the template suggesting to use "Fixes #(issue)" format
  • The title "Manifest fix" doesn't clearly describe the Docker workflow changes being made

Important Files Changed

Changed Files
Filename Score Overview
.github/workflows/images.yml 4/5 Replaces docker/metadata-action with custom bash script for ARM64 tag generation

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it maintains existing functionality while simplifying the implementation
  • Score reflects a straightforward refactoring that removes external dependencies without changing core logic
  • Pay attention to .github/workflows/images.yml to ensure the generated tags match previous behavior

Sequence Diagram

sequenceDiagram
    participant User
    participant GitHub as "GitHub Actions"
    participant AWS as "AWS ECR"
    participant DockerHub as "Docker Hub"
    participant GHCR as "GitHub Container Registry"
    participant Blacksmith as "Blacksmith Runners"

    User->>GitHub: "Trigger workflow (workflow_call/workflow_dispatch)"
    
    par AMD64 Build Jobs
        GitHub->>Blacksmith: "Start build-amd64 job"
        Blacksmith->>GitHub: "Checkout code"
        Blacksmith->>AWS: "Configure AWS credentials"
        AWS-->>Blacksmith: "Return credentials"
        Blacksmith->>AWS: "Login to ECR"
        AWS-->>Blacksmith: "Return registry URL"
        Blacksmith->>DockerHub: "Login to Docker Hub"
        DockerHub-->>Blacksmith: "Authentication successful"
        
        alt Main branch
            Blacksmith->>GHCR: "Login to GHCR"
            GHCR-->>Blacksmith: "Authentication successful"
        end
        
        Blacksmith->>Blacksmith: "Set up Docker Buildx"
        Blacksmith->>Blacksmith: "Generate tags (ECR + GHCR if main)"
        Blacksmith->>AWS: "Build and push to ECR"
        
        alt Main branch
            Blacksmith->>GHCR: "Build and push AMD64 to GHCR"
        end
    and ARM64 Build Jobs (Main branch only)
        alt Main branch only
            GitHub->>Blacksmith: "Start build-ghcr-arm64 job"
            Blacksmith->>GitHub: "Checkout code"
            Blacksmith->>GHCR: "Login to GHCR"
            GHCR-->>Blacksmith: "Authentication successful"
            Blacksmith->>Blacksmith: "Set up Docker Buildx"
            Blacksmith->>Blacksmith: "Generate ARM64 tags"
            Blacksmith->>GHCR: "Build and push ARM64 to GHCR"
        end
    end
    
    alt Main branch only
        GitHub->>Blacksmith: "Start create-ghcr-manifests job"
        Blacksmith->>GHCR: "Login to GHCR"
        GHCR-->>Blacksmith: "Authentication successful"
        Blacksmith->>GHCR: "Create latest manifest (AMD64 + ARM64)"
        Blacksmith->>GHCR: "Create SHA manifest (AMD64 + ARM64)"
        GHCR-->>Blacksmith: "Manifests created successfully"
    end
    
    GitHub-->>User: "Workflow completed"
Loading

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@Sg312 Sg312 changed the title Manifest fix fix(ci): fix docker manifest build Sep 30, 2025
@Sg312 Sg312 merged commit 7de9e5f into staging Sep 30, 2025
13 of 15 checks passed
@vercel vercel bot temporarily deployed to staging – sim September 30, 2025 03:59 Inactive
@waleedlatif1 waleedlatif1 deleted the fix/docker-ci-3 branch October 7, 2025 23:22
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