PR checks not run unless workflow file is changed

We have added a linting GitHub Action that is supposed to run on pull_requests targeting dev or master as status checks. Some facts:

  • This is in a private repository
  • The targeted branches are protected (both dev and master)
  • We require the status checks to pass before merging
  • The status check we have added is set to Required

It seems that when we create a PR that makes changes to the workflow file (i.e. .github/workflows/linting.yml) the status checks are run as expected. But if not, the status check is shown like this:

When I first configured the status checks to be required to pass before merging, all PRs that did not modify the workflow file got status checks that looked like in the above image.

Have found several topics on this forum (as well as other sites) that mention the Expected message

Expected — Waiting for status to be reported

but haven’t found anything that applies to our case.

Configuration File
name: Linting

    branches: [ master, dev ]

    runs-on: ubuntu-latest
      - uses: actions/checkout@v1
      - name: GitHub Action for SwiftLint
        uses: norio-nomura/action-swiftlint@3.2.1
          args: <ARGS>
Similar Threads

This is probably because the PRs are created based on a base branch from before the workflow existed. So the check is required by the target branch but doesn’t exist in the contribution branch.

The PR would need to be rebased to pickup the required workflow.

I rebased one of my branches with the new workflow, but that did unfortunately not solve it.

But I’ll observe this when our other PRs gets updated, thanks for the suggestion.