Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"actions/get-latest-workflow-artifact": "0.2.0",
"actions/create-github-app-token": "0.2.0",
"actions/run-capslock": "0.2.0",
"actions/azure-trusted-signing": "1.0.0"
"actions/azure-trusted-signing": "1.0.0",
"actions/validate-renovate-config": "0.1.0"
}
50 changes: 50 additions & 0 deletions actions/validate-renovate-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# validate-renovate-config

Validates Renovate configuration files using [renovate-config-validator](https://docs.renovatebot.com/config-validation/).

## Inputs

- `path`: Path to the Renovate config file to validate. Defaults to `renovate.json`.

## Example workflow

```yaml
name: Validate Renovate Config

on:
pull_request:
paths:
- "renovate.json"
push:
branches:
- main
paths:
- "renovate.json"

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Validate Renovate Config
uses: grafana/shared-workflows/actions/validate-renovate-config@validate-renovate-config/v0.1.0
```

## Validating multiple files

To validate multiple config files, call the action multiple times:

```yaml
- name: Validate main config
uses: grafana/shared-workflows/actions/validate-renovate-config@validate-renovate-config/v0.1.0
with:
path: renovate.json

- name: Validate preset
uses: grafana/shared-workflows/actions/validate-renovate-config@validate-renovate-config/v0.1.0
with:
path: presets/default.json
```
22 changes: 22 additions & 0 deletions actions/validate-renovate-config/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Validate Renovate Config
description: Validates Renovate configuration files using renovate-config-validator

inputs:
path:
description: Path to the Renovate config file to validate (e.g., 'renovate.json')
required: false
default: renovate.json

runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "20"

- name: Validate Renovate config
shell: bash
run: npx --yes --package renovate -- renovate-config-validator "${CONFIG_PATH}"
env:
CONFIG_PATH: ${{ inputs.path }}
5 changes: 5 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@
"actions/create-github-app-token": {
"package-name": "create-github-app-token",
"extra-files": ["README.md"]
},
"actions/validate-renovate-config": {
"package-name": "validate-renovate-config",
"extra-files": ["README.md"],
"initial-version": "0.1.0"
}
},
"release-type": "simple",
Expand Down
Loading