watcher: use gh api tag order, not sort -V on hex sha

This commit is contained in:
mia
2026-06-28 10:51:55 -04:00
parent 9f9fd3fd7f
commit 7f4b0009d0

View File

@@ -26,6 +26,8 @@ jobs:
- name: Compare upstream latest vs current PATCHES_REF - name: Compare upstream latest vs current PATCHES_REF
id: cmp id: cmp
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
set -euo pipefail set -euo pipefail
REPO=$(grep -E '^PATCHES_REPO=' build_image.sh | head -1 | cut -d'"' -f2) REPO=$(grep -E '^PATCHES_REPO=' build_image.sh | head -1 | cut -d'"' -f2)
@@ -34,10 +36,9 @@ jobs:
echo "stale=false" >> "$GITHUB_OUTPUT" echo "stale=false" >> "$GITHUB_OUTPUT"
exit 0 exit 0
fi fi
LATEST=$(git ls-remote --tags https://github.com/ps5-linux/ps5-linux-patches.git \ LATEST=$(gh api repos/ps5-linux/ps5-linux-patches/tags --paginate \
| grep -oE 'kernel-[0-9]+\.[0-9]+\.[0-9]+-[a-f0-9]+' \ --jq '.[] | select(.name | test("^kernel-[0-9]+\\.[0-9]+\\.[0-9]+-[a-f0-9]+$")) | .name' \
| sort -V \ | head -1)
| tail -1)
if [ -z "$LATEST" ]; then if [ -z "$LATEST" ]; then
echo "no kernel-*-* tags found upstream"; exit 1 echo "no kernel-*-* tags found upstream"; exit 1
fi fi