title: How to automatically re-run GitHub workflow after the base branch was changed for a PR?
body: <p>I have a GitHub workflow that protects a master branch from unwanted merges. When I open a &quot;wrong&quot; PR to a master, the workflow fails the PR (that is what I expect). My problem is - when I change the base branch from master to something else in existing PR, the workflow doesn't re-run, so my PR is still blocked. Any advice on how to change that?</p>
  <p>The workflow I am talking about looks like that:</p>
  <pre><code>name: Only release or hotfix branches can be merged to master
  
  on:
    pull_request:
      branches:
        - master
  
  jobs:
    restrict-to-release-branch:
      steps:
        - name: Check that the branch name contains words release or hotfix
          if: ${{ github.base_ref == 'master' }}
          run: |
            echo github.head_ref: ${{ github.head_ref }}
            echo ${{ github.head_ref }} | grep &quot;^release\|^hotfix&quot;
  </code></pre>