From 4ab39d0215a8798af4337cffad16ee489c3e07dc Mon Sep 17 00:00:00 2001 From: Herbert Wirnsberger Date: Fri, 21 Jun 2024 11:36:44 +0200 Subject: [PATCH] move quarkus-update script to renovate config repo --- .github/workflows/renovate.yaml | 2 ++ quarkus-update | 16 ++++++++++++++++ renovate-config.js | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100755 quarkus-update diff --git a/.github/workflows/renovate.yaml b/.github/workflows/renovate.yaml index 11526a0..bd2143b 100644 --- a/.github/workflows/renovate.yaml +++ b/.github/workflows/renovate.yaml @@ -22,5 +22,7 @@ jobs: renovate-version: main-8b03812 token: ${{ secrets.RENOVATE_TOKEN }} configurationFile: renovate-config.js + docker-volumes: | + /home/runner/work/renovate/renovate/quarkus-update:/github-action/quarkus-update env: LOG_LEVEL: debug diff --git a/quarkus-update b/quarkus-update new file mode 100755 index 0000000..c89815f --- /dev/null +++ b/quarkus-update @@ -0,0 +1,16 @@ +#!/bin/bash + +branchName=$1 +oldVersion=$2 +newVersion=$3 +newMajorMinor=$4 +$platform=$5 +$sourceRepoOrg=$6 +$sourceRepoName=$7 + +echo $ + +if [ "$branchName" = "renovate/quarkus.platform.version" ]; then + echo "Branch: $branchName; Old version: $oldVersion; New MajorMinorVersion: $newMajorMinor" + /tmp/renovate/repos/$platform/$sourceRepoOrg/$sourceRepoName/mvnw -f /tmp/renovate/repos/$platform/$sourceRepoOrg/$sourceRepoName/pom.xml quarkus:update -Dquarkus.platform.version=$oldVersion -Dstream=$newMajorMinor +fi diff --git a/renovate-config.js b/renovate-config.js index 86a0964..7a24889 100644 --- a/renovate-config.js +++ b/renovate-config.js @@ -6,10 +6,10 @@ module.exports = { ], prHourlyLimit: 0, postUpgradeTasks: { - commands: ["./quarkus-update {{branchName}} {{currentVersion}} {{newVersion}} {{newMajor}}.{{newMinor}}"], + commands: ["/github-action/quarkus-update {{branchName}} {{currentVersion}} {{newVersion}} {{newMajor}}.{{newMinor}} {{platform}} {{sourceRepoOrg}} {{sourceRepoName}}"], fileFilters: ["**/*", "**/.*"] }, allowedPostUpgradeCommands: [ - "^./quarkus-update {{branchName}} {{currentVersion}} {{newVersion}} {{newMajor}}.{{newMinor}}$" + "^/github-action/quarkus-update {{branchName}} {{currentVersion}} {{newVersion}} {{newMajor}}.{{newMinor}} {{platform}} {{sourceRepoOrg}} {{sourceRepoName}}$" ] }