mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-16 17:02:36 +00:00
ci: ensure example/ passes renovate-config-validator (#962)
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:
parent
f5951c521b
commit
5fde7be597
2 changed files with 22 additions and 0 deletions
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
|
|
@ -113,11 +113,30 @@ jobs:
|
||||||
docker-cmd-file: example/entrypoint.sh
|
docker-cmd-file: example/entrypoint.sh
|
||||||
docker-user: root
|
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:
|
release:
|
||||||
needs:
|
needs:
|
||||||
- lint
|
- lint
|
||||||
- commitlint
|
- commitlint
|
||||||
- e2e
|
- e2e
|
||||||
|
- renovate-config-validator
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Git user
|
- name: Setup Git user
|
||||||
|
|
|
||||||
3
example/package.json
Normal file
3
example/package.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"type": "commonjs"
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue