GitHub comment job type for Workflows

Sep 12, 2025 by

Ash Wu

Ash Wu

The GitHub comment job posts reports of your workflow's completed builds and updates to GitHub pull requests. It makes it easy for your reviewers and testers to see what your changes will look like once they're deployed.

GitHub comment with build and update details

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:

Code
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.

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:

Code
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:

Code
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:

Code
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.