Queued "(Unknown event)" actions by "ghost"

I’m running this forked action https://github.com/mhitza/flake8-github-action within a workflow file, and after completion, the annotations posted show up in the “This run” tab of “(Unknown event)” queued up actions.

Hi @mhitza , 

I tried your forked action, it worked fine on my workflow. 

Is there any detail error message when you go into the “unknown event” workflow run page and choose a job?  And would you mind sharing your workflow yml file here? 

Hi @yanjingzhu ,

The issue shows up once there are validation failures, the moment when the action tries to publish annotations via the Checks API. I don’t think my latest updated action is the same as the one as when I initially reported the issue, and the issue might show up a bit differently. I’ve raised this issue with support and got confirmation that it’s an issue they are looking into, and it’s been reported by multiple users.

In my case, I just wrote my own action that doesn’t use the Checks API and instead relies on the ::error output format for inline annotations.

Hi @mhitza ,

It looks to me that you are running the action which creates the annotations on a workflow using the pull_request event instead of the push event. The difference being that the pull request event SHA points to an intermediate merge commit. This means that the checks are being created with an unknown reference and the Actions UI compensates by displaying what is shown in the screenshot.

You can modify the action using something like the following to get the correct SHA and use it when creating the check.

import * as github from '@actions/github'

const head_sha = github.context.payload.pull_request?.head?.sha || github.context.sha
1 Like