mirror of
https://github.com/renovatebot/github-action.git
synced 2026-12-02 03:20:28 +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]: https://github.com/renovatebot/.github/blob/2ab0f77818/.github/workflows/test.yml#L44
This commit is contained in:
1 parent
f5951c521b
commit
5fde7be597
2 files changed
+22
No files matched your search
@@ -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
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "commonjs"
|
||||
}
|
||||
Reference in new issue
Block a user