Skip to content

fix(ci): fail fast on TypeScript errors before production Docker build#733

Draft
hamza-mohd with Copilot wants to merge 1 commit into
masterfrom
copilot/fix-docker-build-push-action
Draft

fix(ci): fail fast on TypeScript errors before production Docker build#733
hamza-mohd with Copilot wants to merge 1 commit into
masterfrom
copilot/fix-docker-build-push-action

Conversation

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown

The Production - Docker build and push job was failing 3–5 minutes in when next build inside Docker hit a TypeScript type error (Property 'displayName' does not exist on type '{ version: string; }' in components/catalog/catalog/details/index.tsx), wrapping the real error in Docker build noise.

Changes

  • meshery-cloud-release.yml (prod job): adds a TypeScript type check step after Setup UI Dependencies (node_modules already installed) and before Set up QEMU/Docker build
    • Checks ui/tsconfig.json first, falls back to project root
    • Runs npx tsc --noEmit in a subshell to avoid mutating the working directory for subsequent steps
    • Emits explicit pass/fail messages; exits 1 immediately on type errors with actionable guidance
- name: TypeScript type check
  working-directory: meshery-cloud
  run: |
    if [ -f "ui/tsconfig.json" ]; then
      echo "Running TypeScript check in ui/"
      ( cd ui && npx tsc --noEmit ) && echo "TypeScript type check passed." \
        || { echo "TypeScript type check failed. Fix the type errors above before re-running this workflow."; exit 1; }
    elif [ -f "tsconfig.json" ]; then
      ...
    fi

Failure now surfaces in seconds with a direct pointer to the offending file/line, before QEMU/Buildx setup and the full multi-platform build begin.

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