5

I'm trying to setup dependabot on a Github repo.

Here's my config file:

version: 2
updates:
  - package-ecosystem: "pip"
    directory: "/"
    schedule:
      interval: "daily"
    open-pull-requests-limit: 10

I'm getting the following error:

Annotations
1 error
Error : .github#L1
No event triggers defined in `on`

This error can occur in case of parsing error. But I adapted this file from a copy-paste of an example in the docs. Besides, I validated the yaml file with a validation tool.

Any idea what I'm doing wrong?

Jérôme
  • 13,328
  • 7
  • 56
  • 106
  • 3
    That error suggests it's being parsed as an _actions_ file (which is what the linked question is about); you've put `dependabot.yml` in `.github/workflows/` not just `.github/`. – jonrsharpe Oct 05 '21 at 08:17
  • Link to the repo confirms what @jonrsharpe wrote. – Benjamin W. Oct 05 '21 at 08:25
  • See [here](https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates): "You must store this file in the `.github` directory of your repository." – Benjamin W. Oct 05 '21 at 08:26
  • Oh boy. Glad I asked, cause I could have been searching for a looooong time. I think I was tricked by vim because there was already a workflows directory in .github and nothing else so when creating the dependabot file it ended up in workflows. – Jérôme Oct 05 '21 at 09:01

1 Answers1

12

GitHub parses dependabot.yml as an action file because I put it in .github/workflows/ by mistake.

It should be .github/dependabot.yml.

Jérôme
  • 13,328
  • 7
  • 56
  • 106