Skip to content

Conversation

@Sg312
Copy link
Contributor

@Sg312 Sg312 commented Sep 30, 2025

@vercel
Copy link

vercel bot commented Sep 30, 2025

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

Project Deployment Preview Comments Updated (UTC)
docs Building Building Preview Comment Sep 30, 2025 3:56am
sim (staging) Building Building Sep 30, 2025 3:56am

@Sg312 Sg312 merged commit 367189f into main Sep 30, 2025
3 of 6 checks passed
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 fixes a Docker manifest build issue in the CI workflow by simplifying the ARM64 tag generation process. The change replaces the `docker/metadata-action@v5` action with a straightforward shell command that directly generates the required ARM64 tags using `${{ github.sha }}`.

The modification addresses issue #1494, which appears to be related to SHA prefix problems in Docker manifest creation. Instead of relying on the metadata action's complex configuration with type=sha,format=long,suffix=-arm64, the new approach uses a simple shell script to create two tags: latest-arm64 and ${{ github.sha }}-arm64. This change integrates with the existing multi-architecture manifest creation step that expects tags in the format ${IMAGE}:${SHA}-arm64 and ${IMAGE}:${SHA}-amd64 to properly build Docker manifests for both ARM64 and AMD64 architectures.

The fix maintains the same functionality while eliminating potential formatting issues that were causing the manifest build to fail, making the CI pipeline more reliable for Docker image publication.

Important Files Changed

Changed Files
Filename Score Overview
.github/workflows/images.yml 4/5 Simplified ARM64 tag generation by replacing docker metadata action with direct shell command

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it fixes a specific CI issue with a straightforward approach
  • Score reflects a targeted fix that simplifies problematic logic without introducing new complexity or breaking changes
  • No files require special attention beyond standard review of the workflow change

Sequence Diagram

sequenceDiagram
    participant User
    participant GitHub
    participant AMD64_Runner as "AMD64 Runner"
    participant ARM64_Runner as "ARM64 Runner"
    participant Manifest_Runner as "Manifest Runner"
    participant ECR as "Amazon ECR"
    participant GHCR as "GitHub Container Registry"
    participant DockerHub

    User->>GitHub: "Push to main/staging or workflow_dispatch"
    GitHub->>AMD64_Runner: "Start build-amd64 job"
    GitHub->>ARM64_Runner: "Start build-ghcr-arm64 job (main only)"
    
    AMD64_Runner->>AMD64_Runner: "Checkout code"
    AMD64_Runner->>AMD64_Runner: "Configure AWS credentials"
    AMD64_Runner->>ECR: "Login to Amazon ECR"
    AMD64_Runner->>DockerHub: "Login to Docker Hub"
    
    alt main branch
        AMD64_Runner->>GHCR: "Login to GHCR"
    end
    
    AMD64_Runner->>AMD64_Runner: "Set up Docker Buildx"
    AMD64_Runner->>AMD64_Runner: "Generate tags for ECR and GHCR"
    
    loop for each Dockerfile (app, db, realtime)
        AMD64_Runner->>ECR: "Build and push AMD64 image"
        alt main branch
            AMD64_Runner->>GHCR: "Build and push AMD64 image with -amd64 suffix"
        end
    end
    
    alt main branch only
        ARM64_Runner->>ARM64_Runner: "Checkout code"
        ARM64_Runner->>GHCR: "Login to GHCR"
        ARM64_Runner->>ARM64_Runner: "Set up Docker Buildx"
        ARM64_Runner->>ARM64_Runner: "Generate ARM64 tags"
        
        loop for each Dockerfile (app, db, realtime)
            ARM64_Runner->>GHCR: "Build and push ARM64 image with -arm64 suffix"
        end
        
        ARM64_Runner->>Manifest_Runner: "ARM64 build complete"
    end
    
    AMD64_Runner->>Manifest_Runner: "AMD64 build complete"
    
    alt main branch only
        Manifest_Runner->>GHCR: "Login to GHCR"
        
        loop for each image (simstudio, migrations, realtime)
            Manifest_Runner->>GHCR: "Create manifest for :latest combining AMD64 and ARM64"
            Manifest_Runner->>GHCR: "Create manifest for :sha combining AMD64 and ARM64"
        end
    end
    
    Manifest_Runner->>GitHub: "Workflow complete"
Loading

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

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