From 7f4b0009d0dc3cee35965e8af3699c0eb7e113b5 Mon Sep 17 00:00:00 2001 From: mia Date: Sun, 28 Jun 2026 10:51:55 -0400 Subject: [PATCH] watcher: use gh api tag order, not sort -V on hex sha --- .github/workflows/upstream-patches-watch.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/upstream-patches-watch.yml b/.github/workflows/upstream-patches-watch.yml index d5ee549..b54528c 100644 --- a/.github/workflows/upstream-patches-watch.yml +++ b/.github/workflows/upstream-patches-watch.yml @@ -26,6 +26,8 @@ jobs: - name: Compare upstream latest vs current PATCHES_REF id: cmp + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -euo pipefail REPO=$(grep -E '^PATCHES_REPO=' build_image.sh | head -1 | cut -d'"' -f2) @@ -34,10 +36,9 @@ jobs: echo "stale=false" >> "$GITHUB_OUTPUT" exit 0 fi - LATEST=$(git ls-remote --tags https://github.com/ps5-linux/ps5-linux-patches.git \ - | grep -oE 'kernel-[0-9]+\.[0-9]+\.[0-9]+-[a-f0-9]+' \ - | sort -V \ - | tail -1) + LATEST=$(gh api repos/ps5-linux/ps5-linux-patches/tags --paginate \ + --jq '.[] | select(.name | test("^kernel-[0-9]+\\.[0-9]+\\.[0-9]+-[a-f0-9]+$")) | .name' \ + | head -1) if [ -z "$LATEST" ]; then echo "no kernel-*-* tags found upstream"; exit 1 fi