Skip to content

Commit

Permalink
fix ordering of repo2docker versions
Browse files Browse the repository at this point in the history
previous sorting didn't parse version suffixes correctly,
so only the version part was sorted by number, the rest was sorted as strings
so "2024.07.0-9.gafaa6e3" came after "2024.07.0-12.ga61ec54"

instead, parse all number fields
  • Loading branch information
minrk committed Aug 20, 2024
1 parent 843f095 commit fed9160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/watch-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
run: |
latest_tag=$(
docker run --rm quay.io/skopeo/stable list-tags docker://${{ matrix.registry }}/${{ matrix.repository }} \
| jq -r '[.Tags[] | select(. | match("^\\d+\\.\\d+\\.\\d+(-\\d+\\..*)?$"))] | sort_by(split(".-") | map(tonumber? // 0)) | last'
| jq -r '[.Tags[] | select(. | match("^\\d+\\.\\d+\\.\\d+(-\\d+\\..*)?$"))] | max_by(scan("[^-.]+") | tonumber? // 0)'
)
echo "tag=$latest_tag" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit fed9160

Please sign in to comment.