version: 2
registries:
  gradle-plugin-portal:
    type: maven-repository
    url: https://plugins.gradle.org/m2
    username: dummy # Required by dependabot
    password: dummy # Required by dependabot

updates:
  - package-ecosystem: "npm"
    directory: "/sources"
    schedule:
      interval: "weekly"
    groups:
      npm-dependencies:
        patterns:
        - "*"
      
  - package-ecosystem: "github-actions"
    # github-actions with directory: "/" only monitors .github/workflows
    # https://github.com/dependabot/dependabot-core/issues/6345
    directories:
      - "/"
      - "/.github/actions/build-dist"
      - "/.github/actions/init-integ-test"
    schedule:
      interval: "weekly"
    groups:
      github-actions:
        patterns:
          - "*"

  - package-ecosystem: "gradle"
    directories:
      - ".github/workflow-samples/gradle-plugin"
      - ".github/workflow-samples/groovy-dsl"
      - ".github/workflow-samples/java-toolchain"
      - ".github/workflow-samples/kotlin-dsl"
      - ".github/workflow-samples/no-wrapper"
      - ".github/workflow-samples/no-wrapper-gradle-5"
      - "sources/test/init-scripts"
    registries:
      - gradle-plugin-portal
    schedule:
      interval: "weekly"
    groups:
      gradle:
        patterns:
          - "*"