name: Renovate

on:
  schedule:
    # Run every Monday at 8:00 AM UTC
    - cron: "0 8 * * 1"
  workflow_dispatch:
    inputs:
      logLevel:
        description: "Log level"
        required: false
        default: "info"
        type: choice
        options:
          - info
          - debug
          - trace

env:
  LOG_LEVEL: ${{ inputs.logLevel || 'info' }}
  RENOVATE_REPOSITORIES: ${{ github.repository }}

jobs:
  renovate:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Renovate
        uses: renovatebot/github-action@v42.0.4
        with:
          configurationFile: renovate.json
          token: ${{ secrets.GITHUB_TOKEN }}
        env:
          LOG_LEVEL: ${{ env.LOG_LEVEL }}
