Skip to content

Commit 4a68ae8

Browse files
committed
ci: sort versions by semantic increment, not literal increment
otherwise 1877.10 < 1877.9
1 parent b81c4d8 commit 4a68ae8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ jobs:
3333
id: fetch_tag
3434
if: ${{ inputs.image_tag == '' || github.event_name == 'workflow_run' || github.event_name == 'push' }}
3535
run: |
36-
#latest_tag=$(oras repo tags ghcr.io/gardenlinux/gardenlinux-ccloud | grep -E '^[0-9]+\.[0-9]+\.[0-9]+-metal-sci-usi-amd64-[0-9]+-[0-9]+-[0-9]-[0-9a-f]{8}$' | sort -r | head -n 1)
37-
latest_tag=$(oras repo tags ghcr.io/gardenlinux/gardenlinux-ccloud | grep -E '^1877\.[0-9]+\.[0-9]+-metal-sci-usi-amd64-[0-9]+-[0-9]+-[0-9]+-[0-9a-f]{8}$' | sort -r | head -n 1)
36+
#latest_tag=$(oras repo tags ghcr.io/gardenlinux/gardenlinux-ccloud | grep -E '^[0-9]+\.[0-9]+\.[0-9]+-metal-sci-usi-amd64-[0-9]+-[0-9]+-[0-9]-[0-9a-f]{8}$' | sort --version-sort -r | head -n 1)
37+
latest_tag=$(oras repo tags ghcr.io/gardenlinux/gardenlinux-ccloud | grep -E '^1877\.[0-9]+\.[0-9]+-metal-sci-usi-amd64-[0-9]+-[0-9]+-[0-9]+-[0-9a-f]{8}$' | sort --version-sort -r | head -n 1)
3838
echo $latest_tag
3939
echo "latest_tag=$latest_tag" >> $GITHUB_ENV
4040
- name: Build

0 commit comments

Comments
 (0)