Push trigger works but not the schedule one

Hi,

I’ve set up a GitHub action with 2 triggers, push and schedule:

https://github.com/mandrel/graal/blob/mandrel-master/.github/workflows/repo-sync.yml

However, only the push one seems to work, not scheduling happens. Any idea what is going on? According to https://github.community/t5/GitHub-Actions/Multiple-event-triggers-with-config/td-p/33258 multiple triggers are possible.

Thanks

Galder

Hi @galderz ,

Scheduled event only triggers workflow on default or base branch, however your branch(mandrel-master) is not.

As an alternative, you can create a workflow yaml with scheduled event on master(default) branch, and checkout the branch(mandrel-master) for the steps.  Code sample as below:

on:
  schedule:
    - cron: '*/15 * * * *'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          ref: mandrel-master

Thanks.

1 Like