From 92020c1015afcc994ec3f7d1bc24aae7565392f0 Mon Sep 17 00:00:00 2001 From: Adam Cmiel Date: Wed, 4 Dec 2024 18:48:45 +0100 Subject: [PATCH] CI: check renovate.json groups against CODEOWNERS Make sure the groups will stay up to date with CODEOWNERS Signed-off-by: Adam Cmiel --- .github/workflows/check-task-owners.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/check-task-owners.yaml b/.github/workflows/check-task-owners.yaml index fe2685b207..9a12930019 100644 --- a/.github/workflows/check-task-owners.yaml +++ b/.github/workflows/check-task-owners.yaml @@ -13,3 +13,22 @@ jobs: - name: Check task owners run: | ./hack/check-task-owners.sh + + - name: Check renovate.json groups + run: | + #!/bin/bash + set -euo pipefail + + renovate_content=$(cat renovate.json) + ./hack/update_renovate_json_based_on_codeowners.py -o renovate.json + + uptodate=$(jq --argjson previous "$renovate_content" '$previous == .' renovate.json) + echo "renovate.json is up to date: $uptodate" + + if [[ $uptodate == false ]]; then + echo + git --no-pager diff -- renovate.json + echo + echo "To apply the updates, run: ./hack/update_renovate_json_based_on_codeowners.py -o renovate.json" + exit 1 + fi