Skip to content

Commit 17a4332

Browse files
authored
Extract major version of preCICE from the precice-version provided (#5)
1 parent 94df8a6 commit 17a4332

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ runs:
3636
sudo apt update
3737
sudo apt install -y wget
3838
VERSION=${{ inputs.precice-version }}
39-
wget https://github.com/precice/precice/releases/download/${VERSION}/libprecice2_${VERSION#v}_$(lsb_release -cs).deb
40-
sudo apt install -y ./libprecice2_${VERSION#v}_$(lsb_release -cs).deb
41-
rm libprecice2_${VERSION#v}_$(lsb_release -cs).deb
39+
MAJORVERSION=${VERSION:1:1}
40+
wget https://github.com/precice/precice/releases/download/${VERSION}/libprecice${MAJORVERSION}_${VERSION#v}_$(lsb_release -cs).deb
41+
sudo apt install -y ./libprecice${MAJORVERSION}_${VERSION#v}_$(lsb_release -cs).deb
42+
rm libprecice${MAJORVERSION}_${VERSION#v}_$(lsb_release -cs).deb
4243
4344
- name: Get preCICE version hash
4445
if: steps.check.outputs.release == 'false'
@@ -138,4 +139,4 @@ runs:
138139
uses: actions/cache/save@v3
139140
with:
140141
path: ${{ inputs.install-prefix }}
141-
key: ${{ runner.os }}-precice-${{ steps.get-hash.outputs.precice-hash }}
142+
key: ${{ runner.os }}-precice-${{ steps.get-hash.outputs.precice-hash }}

0 commit comments

Comments
 (0)