Skip to content

Commit

Permalink
Update push-compare.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalholthaus authored Nov 15, 2024
1 parent 29ac581 commit 4053b70
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/push-compare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
shell: bash
run: |
# Get latest minor version from dockerhub
dt="$(echo -e '${{ steps.dtags.outputs.output }}' | grep -E '${{ inputs.postgres-major-version }}.[0-9]+$' | sort -Vr | sed q)"
dt="$(echo -e '${{ steps.dtags.outputs.output }}' | grep -E '^${{ inputs.postgres-major-version }}.[0-9]+$' | sort -Vr | sed q)"
if ! [ "$dt" ]; then
echo 'No postgres release in dockerhub found for ${{ inputs.postgres-major-version }}'
exit 1
Expand All @@ -81,14 +81,16 @@ jobs:
minor="${dv[1]}"
echo $minor
# Get the latest tag filtered by postgres major version.
t="$(echo -e '${{ steps.tags.outputs.output }}' | grep -E "${{ inputs.postgres-major-version }}.$minor.[0-9]+$" | sort -Vr | sed q)"
set +e
t="$(echo -e '${{ steps.tags.outputs.output }}' | grep -E "^${{ inputs.postgres-major-version }}.$minor.[0-9]+$" | sort -Vr | sed q)"
set -e
if ! [ "$t" ]; then
t="${{ inputs.postgres-major-version }}.$minor.0"
fi
echo $t
# Increment patch level
IFS='.' read -r -a v <<< "$t"
vers=$((v[2] + 1))
vers=$((v[2] + 3))
echo "output=${{ inputs.postgres-major-version }}.$minor.$vers" >> $GITHUB_OUTPUT
outputs:
Expand Down

0 comments on commit 4053b70

Please sign in to comment.