About the dependabot.yml file

The dependabot.yml controls automated dependency updates in your repository.

The dependabot.yml file is an optional configuration file that gives you fine-grained control over how Dependabot monitors and updates dependencies (mainly version updates but also security updates) in your repository.

Without a dependabot.yml file, Dependabot can still create security updates for vulnerable dependencies if you've enabled Dependabot security updates in your repository settings. However, you won't receive automated version updates or have control over update schedules and other configuration options.

The dependabot.yml file uses YAML syntax. If you're new to YAML and want to learn more, see Learn YAML in five minutes.

Note

Dependabot alerts are configured in the repository or organization "Settings" tab and not in the dependabot.yml file, see Configuring Dependabot alerts.

What the dependabot.yml file does

The dependabot.yml file controls how Dependabot performs updates on your dependencies. With this file, you can:

For version updates

For security updates

Where to store the dependabot.yml file

You must store this file in the .github directory of your repository in the default branch (typically main), at .github/dependabot.yml or .github/dependabot.yaml.

How the dependabot.yml file works

When you add or update the dependabot.yml file in your repository, Dependabot reads the configuration and begins monitoring the specified package ecosystems according to your defined schedules. When Dependabot finds available updates, it creates pull requests with the dependency changes, following any customization rules you've specified in the configuration.

The configuration file requires the following keys for each package ecosystem to monitor.

Basic example

Here's a minimal dependabot.yml file that monitors npm dependencies daily:

version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "daily"

Next step