How to use status event?

I’m struggling to find examples on using the github status event

I tried to use it to run a workflow with a pull requests status changed but that didn’t work. How do I use this event? What emits it? I can’t find anything about it.

My understanding is that on: status in a workflow will be triggered whenever something marks a commit with an error, failure, pending, or success state. That could be a check suite for instance, such as a Netlify integration or a GitHub Actions workflow for pull requests. Here is an example from a PR feed with two commits marked as failed and one as successful:


When something marks a commit like that, then all on: status workflows should run to let you react to this status change.

The Actions documentation refers to the REST API docs about Statuses in general: Repositories - GitHub Docs

There’s another link to the payload data if you want to know more about what information is available about the event via ${{ github.event.status }}.

Especially the payload example is helpful to get a good impression: Webhook events and payloads - GitHub Docs
You can also dump all the event data with a test workflow like so:

name: Status Change
on: status
    runs-on: ubuntu-latest
      - name: Print event data
          GITHUB_EVENT: ${{ toJSON(github.event) }}
        run: |
          echo "$GITHUB_EVENT"

That’s what I was thinking as well, but it’s not working as expected for some reason :woman_shrugging:

I took another look at the docs. There are actually two APIs, for Statuses and for Checks. The :x: icons found here for instance are from checks, not status changes it seems:

You should try the triggers check_run and check_suite and see if that does something.

Neither works as expected, unfortunately

Huh… the only idea I have left is that this could have something to do with workflows not triggering other workflows by default, in order to prevent infinite loops. I’m not sure if it applies here, and whether this suggested solution is applicable: Triggering new workflows using a personal access token

I don’t think the token is relevant, but the infinite loop may be. Do you know if there’s a way to check emitted events to see if any of the aforementioned events are emitted but just don’t triggger other workflows?