Preserve status from previous action run

I’m using this:


on: 
  push:
    paths:
    - 'lib/\*\*'
    - 'app/\*\*'  

This causes this action to run only when the commit contains a filechange that matches those paths.

The action does not run, when there are no files matching.

This is technically correct, but there’s a problem. The status checks on the PR represent wether the PR is good to merge, but technicaly they are linked to the last commit only?!

So here’s a scenario where this is a problem:

Someone makes a PR with the following changes:

  • They make a significant change in app, the action runs, it fails, the code is broken
  • They make another commit, updating the documentation this time
  • The action does not run, it’s not reported, there’s no check
  • The PR is reported by github as green

I’d like to request a solution for this.

1 way would be to match based on all files in all commits in the PR.

another would be to carry over the status of actions that were not run because of filtering based on paths. 

3 Likes