name: Validate Renovate configuration

on:
  pull_request:
    paths:
      - '.github/renovate.json5'

jobs:
  validate:
    name: Validate Renovate configuration
    runs-on: ubuntu-latest
    steps:
      - name: Checkout configuration
        uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

      # this step uses latest renovate slim release
      - name: Validate configuration
        run: >
          docker run --rm --entrypoint "renovate-config-validator"
          -v "${{ github.workspace }}/.github/renovate.json5":"/renovate.json5"
          ghcr.io/renovatebot/renovate:latest "/renovate.json5"
