Schedule workflow missing github.event.repository context

When running a workflow on a push or workflow_dispatch, it populates the github context with repository information under github.event.repository. However, when running the same workflow under a schedule, the information is missing. Here’s the github.event context on a scheduled run.

{
  "event": {
    "schedule": "55 * * * *"
  }
}

Could this information be added? It would greatly simplify workflows running both on push and a cron schedule.

Past that, is there any way to get the same information in an environment variable? For this workflow, I’m trying to get the clone_url for the current repo.

Thanks!

1 Like