Skip to content

Commit

Permalink
use actions insted of reusable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
roobre committed Nov 15, 2024
1 parent 803d4d8 commit 4069896
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions actions/renovate-validate/renovate-validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Validate renovate config

inputs:
config:
required: false
type: string
default: ""
description: |-
Space-separated list of configs to validate. If empty (recommended), renovate find the config for you.
runs:
using: composite
steps:
- name: Renovate config validator
shell: bash
run: |
# Renovate updates the line below. Please keep its formatting as it is.
RENOVATE_IMAGE=ghcr.io/renovatebot/renovate:39.17.0@sha256:89ad65038d8898af0f9deb09aec3377396d603e19a4573a844e70c23ddafd954
if [[ -z "${{ inputs.config }}" ]]; then
docker run -i --rm -v "$(realpath .):/repo" -w /repo --entrypoint renovate-config-validator "$RENOVATE_IMAGE" --strict
exit 0
fi
success="true"
for c in "${{ inputs.config }}"; do
if ! docker run -i --rm -v "$(realpath .):/repo" -w /repo --entrypoint renovate-config-validator "$RENOVATE_IMAGE" --strict "$c"; then
echo "::error file=$c,title=Validation failed::Config file did not pass validation"
success="false"
fi
done
[[ "$success" = "true" ]]

0 comments on commit 4069896

Please sign in to comment.