From 3947da9c41bba79298fee910fa8961f69e34cde5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20C=C3=A1mara?= Date: Mon, 11 May 2026 15:17:29 +0200 Subject: [PATCH] Improve version bump flexibility allowing bump selected gems to higher version level (minor, major) --- .github/workflows/version_bumps.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/version_bumps.yml b/.github/workflows/version_bumps.yml index 3db7c28985..ada686fd68 100644 --- a/.github/workflows/version_bumps.yml +++ b/.github/workflows/version_bumps.yml @@ -16,6 +16,16 @@ on: - "patch" - "minor" - "major" + extra_gems_minor: + description: 'Additional gems to bump at minor level (space-separated). AWS gems are always included automatically. Only used during patch runs.' + required: false + default: '' + type: string + extra_gems_major: + description: 'Gems to also bump at major level (space-separated). Used during patch or minor runs.' + required: false + default: '' + type: string permissions: pull-requests: write @@ -54,6 +64,24 @@ jobs: - run: git config --global user.name "logstashmachine" - run: ./gradlew clean installDefaultGems - run: ./vendor/jruby/bin/jruby -S bundle update --all --${{ env.INPUTS_BUMP }} --strict + - name: Bump selected deps at minor level + if: ${{ inputs.bump == 'patch' }} + run: | + AWS_GEMS=$(./vendor/jruby/bin/jruby -S bundle list --name-only | grep '^aws-') + EXTRA="${{ inputs.extra_gems_minor }}" + GEMS=$(echo "${AWS_GEMS} ${EXTRA}" | xargs) + if [ -n "$GEMS" ]; then + echo "Bumping at --minor: ${GEMS}" + ./vendor/jruby/bin/jruby -S bundle update $GEMS --minor --strict --conservative + fi + - name: Bump selected deps at major level + if: ${{ inputs.bump != 'major' && inputs.extra_gems_major != '' }} + run: | + GEMS=$(echo "${{ inputs.extra_gems_major }}" | xargs) + if [ -n "$GEMS" ]; then + echo "Bumping at --major: ${GEMS}" + ./vendor/jruby/bin/jruby -S bundle update $GEMS --major --strict --conservative + fi - run: mv Gemfile.lock Gemfile.jruby-*.lock.release - run: echo "T=$(date +%s)" >> $GITHUB_ENV - run: echo "BRANCH=update_lock_${{ env.INPUTS_BRANCH }}_${T}" >> $GITHUB_ENV