From c67119d4d0c09d8d3fc7303903d778c5a641a022 Mon Sep 17 00:00:00 2001 From: pascalholthaus <94793111+pascalholthaus@users.noreply.github.com> Date: Thu, 7 Mar 2024 13:58:48 +0100 Subject: [PATCH] Fix: sort (#13) --- .github/workflows/push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index fb682de..413d171 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -64,7 +64,7 @@ jobs: - name: Helm upgrade matrix id: upgrade run: | - echo "matrix=$(echo '${{ inputs.charts }}' | jq -r '{include:[.[] | {chart: ., digest: "${{ inputs.postgres-major-version }}@${{ steps.build.outputs.digest }}" }]} | @json')" >> $GITHUB_OUTPUT + echo "matrix=$(echo '${{ inputs.charts }}' | jq -r '{include:[.[] | {chart: ., digest: "${{ steps.build.outputs.digest }}" }]} | @json')" >> $GITHUB_OUTPUT outputs: matrix: ${{ steps.upgrade.outputs.matrix }} @@ -92,7 +92,7 @@ jobs: shell: bash run: | # Get the latest tag filtered by postgres major version. - t="$(echo -e '${{ steps.tags.outputs.output }}' | grep -E '${{ inputs.postgres-major-version }}.[0-9]+.[0-9]+' | sort -n | sed q)" + t="$(echo -e '${{ steps.tags.outputs.output }}' | grep -E '${{ inputs.postgres-major-version }}.[0-9]+.[0-9]+' | sort -nr | sed q)" IFS='.' read -r -a v <<< "$t" # Increment patch level v[2]=$((v[2] + 1))