From dd1221ed0ec8c9fb86114baec6e0ac16c9e0b2f1 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Mon, 5 Feb 2024 15:16:49 +0100 Subject: [PATCH] Extract major version of preCICE from the precice-version provided --- action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 2e041b2..7f6afaf 100644 --- a/action.yml +++ b/action.yml @@ -36,9 +36,10 @@ runs: sudo apt update sudo apt install -y wget VERSION=${{ inputs.precice-version }} - wget https://github.com/precice/precice/releases/download/${VERSION}/libprecice2_${VERSION#v}_$(lsb_release -cs).deb - sudo apt install -y ./libprecice2_${VERSION#v}_$(lsb_release -cs).deb - rm libprecice2_${VERSION#v}_$(lsb_release -cs).deb + MAJORVERSION=${VERSION:1:1} + wget https://github.com/precice/precice/releases/download/${VERSION}/libprecice${MAJORVERSION}_${VERSION#v}_$(lsb_release -cs).deb + sudo apt install -y ./libprecice${MAJORVERSION}_${VERSION#v}_$(lsb_release -cs).deb + rm libprecice${MAJORVERSION}_${VERSION#v}_$(lsb_release -cs).deb - name: Get preCICE version hash if: steps.check.outputs.release == 'false' @@ -138,4 +139,4 @@ runs: uses: actions/cache/save@v3 with: path: ${{ inputs.install-prefix }} - key: ${{ runner.os }}-precice-${{ steps.get-hash.outputs.precice-hash }} \ No newline at end of file + key: ${{ runner.os }}-precice-${{ steps.get-hash.outputs.precice-hash }}