Data report"State of code review 2024" is now liveRead the full report

GitHub Actions status

Kenny DuMez
Kenny DuMez
Graphite software engineer

Understanding the status of GitHub Actions workflows is crucial for continuous integration and deployment pipelines. This guide will explore the intricacies of GitHub Actions status, including how to monitor build status, how to integrate build status badges into your repository, and how to check workflow status effectively.

In GitHub Actions, the build status indicates the success or failure of workflow runs triggered by events within your repository, such as pushes, pull requests, or scheduled events. Each run of a workflow will result in a status that can be used to determine if your latest commits are healthy or if a build has failed due to errors in the code or the workflow configuration.

The status of a build is visible directly on GitHub:

  • In the repository: Navigate to the main page of your repository, click on the "Actions" tab, and you will see a list of workflow runs. Each run displays a status icon indicating success (green check), failure (red cross), or in progress (yellow circle).
  • In pull requests: Workflow statuses are also shown in pull requests affecting the branches that have associated workflows. This helps reviewers and other collaborators see whether the proposed changes pass the configured workflows.

A status badge is a small image that displays the status of your workflow runs. This badge can be embedded in your repository's README.md file or any other web page to provide a real-time status update of your actions.

To add a status badge:

  1. Navigate to the "Actions" tab of your GitHub repository.
  2. Select a workflow from the list.
  3. Click on the three dots in the upper right corner of the workflow summary, and select "Create status badge".
  4. Copy the generated Markdown or HTML snippet and embed it in your README.md file or any other relevant document.

This badge will automatically update to reflect the current status of the associated workflow, providing an immediate visual status update to anyone viewing the repository.

To check the status of a workflow via the GitHub interface:

  1. Go to the "Actions" tab of your repository.
  2. You will see a list of all the workflow runs. Click on any run to view more detailed information about the run, including jobs executed, steps within those jobs, and outputs.
  3. Each step in a job will have its own status icon, log output, and artifacts, if applicable.

For more automated and detailed tracking, you can use the GitHub API to query workflow statuses. Here's a basic example using curl to retrieve the status of workflows:

Terminal
curl -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token YOUR_GITHUB_TOKEN" \
"https://api.github.com/repos/USERNAME/REPOSITORY/actions/runs"

This command retrieves the list of workflow runs for a repository, which can be parsed to monitor statuses programmatically.

  • Scheduled checks: Set up a cron job or a scheduled workflow to check the status of critical workflows at regular intervals.
  • Notifications: Configure GitHub Actions to send notifications via Slack, email, or other communication tools if a workflow fails.

For further reading on GitHub actions status, see the official GitHub documentation.

Graphite
Git stacked on GitHub

Stacked pull requests are easier to read, easier to write, and easier to manage.
Teams that stack ship better software, faster.

Or install our CLI.
Product Screenshot 1
Product Screenshot 2