renovatebot-github/.github/workflows/config-validator.yml
Jamie Tanna c2e09e05e2 ci: ensure example/ passes renovate-config-validator
As noted in #910, we have invalid configuration shared as an example,
which isn't ideal.

We should validate any JSON and `config.js` files in the example
directory.

This is a separate check to allow us to run it only for changes to the
examples, or the Workflow definition.
2025-11-07 10:02:00 +00:00

42 lines
1.2 KiB
YAML

name: Validate example configuration
on:
push:
paths:
- example/*
- .github/workflows/config-validator.yml
pull_request:
paths:
- example/*
- .github/workflows/config-validator.yml
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
env:
RENOVATE_VERSION: 41.173.1 # renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate
jobs:
renovate-config-validator:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
show-progress: false
# When running the config validator in this repo, with the `package.json`, we receive error:
#
# module is not defined in ES module scope
#
# So we need to delete the `package.json` to allow us to validate the `config.js`
- name: Remove `package.json`
run: rm package.json
- name: Validate Renovate configuration
run: |
cd example
env LOG_LEVEL=debug npx --yes --package renovate@${{ env.RENOVATE_VERSION }} -- renovate-config-validator *.json *.js