diff options
| author | Nippy <nippy@rp1.hu> | 2026-05-24 10:37:29 +0200 |
|---|---|---|
| committer | Nippy <nippy@rp1.hu> | 2026-05-24 10:37:29 +0200 |
| commit | 01f549a24b4733908e8f37183e903c938c19e49b (patch) | |
| tree | eef7f6a3c0b68f652e1fce17a36f1494b6ac136d /.forgejo/workflows/kernel-update-check.yml | |
| parent | 3cd4f44d77e39cec1b6f790e47110cba1591d202 (diff) | |
| download | RaveOS-PKGBUILD-01f549a24b4733908e8f37183e903c938c19e49b.tar.gz RaveOS-PKGBUILD-01f549a24b4733908e8f37183e903c938c19e49b.zip | |
fix: CachyOS verzio lekerdezese PKGBUILD-bol (GitHub API rate limit kikuszobolese)
Diffstat (limited to '.forgejo/workflows/kernel-update-check.yml')
| -rw-r--r-- | .forgejo/workflows/kernel-update-check.yml | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/.forgejo/workflows/kernel-update-check.yml b/.forgejo/workflows/kernel-update-check.yml index f28a8f9..8878052 100644 --- a/.forgejo/workflows/kernel-update-check.yml +++ b/.forgejo/workflows/kernel-update-check.yml @@ -19,25 +19,19 @@ jobs: id: check run: | set -euo pipefail - LATEST=$(curl -fsSL --retry 3 "https://api.github.com/repos/CachyOS/linux/tags" \ - | python3 -c " - import sys, json, re - tags = json.load(sys.stdin) - versions = [] - for t in tags: - m = re.match(r'cachyos-(\d+\.\d+)\.(\d+)-(\d+)$', t['name']) - if m: - versions.append((t['name'], m.group(1), m.group(2), m.group(3))) - if versions: - versions.sort(key=lambda x: (list(map(int, x[1].split('.'))), int(x[2]), int(x[3])), reverse=True) - latest = versions[0] - print(f'TAG={latest[0]}') - print(f'MAJOR={latest[1]}') - print(f'MINOR={latest[2]}') - print(f'TAGREL={latest[3]}') - ") - echo "$LATEST" >> $GITHUB_OUTPUT - echo "Legfrissebb CachyOS: $LATEST" + PKGBUILD=$(curl -fsSL --retry 3 \ + "https://raw.githubusercontent.com/CachyOS/linux-cachyos/master/linux-cachyos/PKGBUILD") + MAJOR=$(echo "$PKGBUILD" | grep '^_major=' | cut -d= -f2) + MINOR=$(echo "$PKGBUILD" | grep '^_minor=' | cut -d= -f2) + TAGREL=$(echo "$PKGBUILD" | grep '^_tagrel=' | cut -d= -f2) + if [ -z "$MAJOR" ] || [ -z "$MINOR" ] || [ -z "$TAGREL" ]; then + echo "HIBA: Nem sikerult a CachyOS verziot lekerdezni" + exit 1 + fi + echo "MAJOR=$MAJOR" >> $GITHUB_OUTPUT + echo "MINOR=$MINOR" >> $GITHUB_OUTPUT + echo "TAGREL=$TAGREL" >> $GITHUB_OUTPUT + echo "Legfrissebb CachyOS: ${MAJOR}.${MINOR}-${TAGREL}" - name: Read current version id: current |