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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      # 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"
