Workflow_run runs but not showing in the PR checks

I’ve created and merged into the default branch a new workflow_run workflow.

The workflow_run workflow runs correctly after the “regular” PR workflows complete, but it won’t show in the PR checks, and it won’t add the expected comment to the PR either.

2 Likes

I have the same issue. The 2 workflow files are committed to the default branch and I can see in the Actions tab that the preflight workflow actually triggers the testing workflow but the PR check for unit tests does not get resolved. I’m not sure but I think the issue is that the workflow gets triggered for the default branch? How do I run the workflow in the context of the PR or associate the run with the PR?

preflight.yml

name: Preflight

on: push

jobs:
  preflight-job:
    runs-on: ubuntu-latest
    steps:
      - run: echo "Pre-testing workflow done - Run actual tests now"

testing.yml

name: Unit Test & Cypress CI

on:
  workflow_run:
    workflows:
      - Preflight
    types:
      - completed

jobs:
  unit:
    name: unit tests
    ...

Any help would be appreciated :pray:

1 Like