ci: ensure example/ passes renovate-config-validator
Some checks are pending
Build / prepare (push) Waiting to run
Build / commitlint (push) Waiting to run
Build / lint (push) Blocked by required conditions
Build / e2e (example/renovate-config.js) (push) Blocked by required conditions
Build / e2e (example/renovate-config.json) (push) Blocked by required conditions
Build / renovate-config-validator (push) Waiting to run
Build / release (push) Blocked by required conditions

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.

We need to make sure that we override the ESM settings in this repo, as
otherwise we receive:

  module is not defined in ES module scope

When trying to validate the `renovate-config.js`.

This also follows the usage of a container from Renovate[0] for using
the container to run the validator.

[0]: 2ab0f77818/.github/workflows/test.yml (L44)
This commit is contained in:
Jamie Tanna 2025-11-07 09:31:54 +00:00
parent 47283fac74
commit a417869363
2 changed files with 22 additions and 0 deletions

View file

@ -113,11 +113,30 @@ jobs:
docker-cmd-file: example/entrypoint.sh
docker-user: root
renovate-config-validator:
runs-on: ubuntu-latest
timeout-minutes: 10
container:
image: ghcr.io/renovatebot/renovate:42.54.1@sha256:c4aa5b11d1462705fb2c315970600cedb326d80b24ba1883f8098d93934c4483
# github hosted runners are running as `1001:127` (ubuntu:docker)
options: -u 1001:0 --group-add 1000 --group-add 12021 --group-add 127
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
show-progress: false
- name: Validate Renovate configuration
working-directory: example
run: |
renovate-config-validator renovate-config.js renovate-config.json
release:
needs:
- lint
- commitlint
- e2e
- renovate-config-validator
runs-on: ubuntu-latest
steps:
- name: Setup Git user

3
example/package.json Normal file
View file

@ -0,0 +1,3 @@
{
"type": "commonjs"
}