My github action is not triggering on pull requests from my forked repository into the upstream. Looking to see if anyone else has experienced this and has any suggestions. Here is my setup:
I have an orginizational project (upstream) with two branches: “master” and “next”.
I have a personal fork (origin) of the organizational project.
I then do the following:
-
make local change
-
push local change to my origin
-
create pull request in which the change will be pulled into the “next” branch on the upstream
Given my github workflow, I would expect an action to trigger but it does not.
If I merge the PR, I then see an action trigger. Any ideas why its not triggered on the PR?
Here is my github action:
name: Node.js CI
on:
push:
branches: [master, next]
pull_request:
branches: [master, next]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: ... other npm scripts related to my project (lint, test, etc)...
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI: true