---
title: GitHub comment job type for Workflows
authors: Ash Wu
published: September 12, 2025
---

## Using the GitHub Comment job

To post build and update reports to a GitHub pull request, add a job with `type: github-comment` to your workflow:

```yaml
name: PR Auto Comment

on:
  pull_request: {}

jobs:
  # build_ios, build_android, and publish_update jobs

  comment_on_pr:
    name: Post Results to PR
    after: [build_ios, build_android, publish_update]
    type: github-comment
```

The job above will auto-detect the build and update IDs in your workflow and include them in a GitHub comment.

![GitHub comment with build and update details](https://cdn.sanity.io/images/9r24npb8/production/b1e204525fec21c9201f32e8517670b2b91a7086-1540x1408.png)

The job operates in two modes: auto-with-overrides mode (default) and payload mode for fully custom comments.

## Auto-discovery

By default, the job automatically discovers all completed builds and updates from your workflow. You can customize which builds and updates to include:

```yaml
name: Custom Build Report

jobs:
  # build_ios, build_android, and publish_update jobs

  custom_comment:
    name: Post Custom Report
    after: [build_ios, build_android, publish_update]
    type: github-comment
    params:
      message: "🎉 Preview builds are ready! Please test these changes before approving the PR."
      build_ids:
        - ${{ after.build_ios.outputs.build_id }}
        - ${{ after.build_android.outputs.build_id }}
      update_group_ids:
        - ${{ after.publish_update.outputs.first_update_group_id }}
```

## Payload mode

For complete control over comment content, use payload mode with markdown:

```yaml
name: Custom Comment

jobs:
  custom_payload:
    name: Post Custom Comment
    type: github-comment
    params:
      payload: |
        ## 🚀 Deployment Complete
        
        Your custom comment!
```

## Additional use cases

The GitHub comment job is flexible, so that it can fit your team's needs. You can combine the control flow properties of jobs, like `needs` and `after`, to post specific messages about job statuses, like in this example:

```yaml
name: Conditional PR Comment

on:
  pull_request: {}

jobs:
  build_android:
    name: Build Android
    type: build
    params:
      platform: android
      profile: preview

  comment_success:
    name: Post Success Comment
    needs: [build_android]
    if: ${{ needs.build_android.status == 'success' }}
    type: github-comment
    params:
      message: '✅ Android build succeeded! Ready for testing.'
      build_ids: # provided only for instructional purposes, you could as well omit this here
        - ${{ needs.build_android.outputs.build_id }}

  comment_failure:
    name: Post Failure Comment
    after: [build_android]
    if: ${{ after.build_android.status == 'failure' }}
    type: github-comment
    params:
      payload: |
        ❌ **Android build failed**

        Please check the [workflow logs](https://expo.dev/accounts/[account]/projects/[project]/workflows) for details.

```

Learn more about the GitHub Comment job type in our [prepackaged jobs documentation](https://docs.expo.dev/eas/workflows/pre-packaged-jobs/#github-comment).