title: Trigger github action on push to multiple branches
body: <p>According to <a href="https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags" rel="nofollow noreferrer">document</a>, we can specify multiple branches on push event. According to my understanding, if we us a workflow description file like below,</p>
  <pre><code>...
  
  on:
    push:
      branches:
        - main
        - dev
  
  ...
  </code></pre>
  <p>when I push to <code>master</code> branch or <code>dev</code> branch, this workflow should run. But in reality, when I locate this workflow file at <code>master</code> branch, only pushes to <code>master</code> branch triggers workflow run. Additionally, when I locate this file on <code>dev</code> branch, only pushes to <code>dev</code> branch triggers workflow run.</p>
  <p>It seems that though I specify multiple branches to workflow file, workflow runs only when target branch and location of workflow file matches. If this is true, I'm not sure why <code>branches</code> key exists. It pretends to work on multiple branches.</p>
  <p>Can anybody explain details on this?</p>