From 9ccaac89340587f33cf146d3151c23fb9dce9813 Mon Sep 17 00:00:00 2001 From: Nick Cross Date: Fri, 10 Apr 2026 13:49:20 +0100 Subject: [PATCH] Add ability to configure maven version --- .github/workflows/maven-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index 0c8a5d3..57a71c8 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -27,6 +27,12 @@ on: required: false type: boolean default: false + maven_version: + description: 'The Maven version to use. Defaults to version of the runner image' + required: false + type: string + # Can't have dynamic default of the current version of Maven in the runner so hard-code it. + default: '3.9.14' # cancel in-progress runs of the same workflow # to avoid unnecessary runs when multiple commits pushed @@ -52,6 +58,11 @@ jobs: distribution: 'temurin' cache: maven + - name: Set up Maven '${{ inputs.maven_version }}' + uses: stCarolas/setup-maven@12eb41b233df95d49b0c11fc1b5bc8312e5d4ce0 # v5.1 + with: + maven-version: '${{ inputs.maven_version }}' + - name: Build Command invocation run: bash -c "${INPUTS_BUILD_COMMAND}" env: