35 lines
838 B
YAML
35 lines
838 B
YAML
---
|
|
name: Validate Renovate config
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
validate:
|
|
name: Validate renovate config
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Check for changes
|
|
id: diff
|
|
run: |
|
|
if [[ $(git diff --name-only "origin/${GITHUB_BASE_REF}" -- renovate.json | wc -l) -gt 0 ]]; then
|
|
echo "any_changed=true" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "any_changed=false" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- shell: bash
|
|
if: ${{ steps.diff.outputs.any_changed == 'true' }}
|
|
run: |
|
|
set +o pipefail
|
|
npx -y -p renovate -c renovate-config-validator \
|
|
| tee /dev/stderr \
|
|
| grep -Evz '(ERROR|could not be parsed)'
|