mirror of
https://github.com/ps5-linux/ps5-linux-image.git
synced 2026-07-15 21:42:27 +00:00
watcher: use gh api tag order, not sort -V on hex sha
This commit is contained in:
9
.github/workflows/upstream-patches-watch.yml
vendored
9
.github/workflows/upstream-patches-watch.yml
vendored
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user