mirror of
https://github.com/ps5-linux/ps5-linux-image.git
synced 2026-07-16 01:50:40 +00:00
watcher: use releases api (chronological), not tags
This commit is contained in:
8
.github/workflows/upstream-patches-watch.yml
vendored
8
.github/workflows/upstream-patches-watch.yml
vendored
@@ -32,12 +32,14 @@ jobs:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tags API returns by commit-date (most recent first).
|
// Releases API returns by published_at (most recent first).
|
||||||
const tags = await github.paginate(github.rest.repos.listTags, {
|
// Tags API order is not chronological — hex SHA suffixes sort
|
||||||
|
// alphabetically.
|
||||||
|
const releases = await github.paginate(github.rest.repos.listReleases, {
|
||||||
owner: 'ps5-linux', repo: 'ps5-linux-patches', per_page: 100,
|
owner: 'ps5-linux', repo: 'ps5-linux-patches', per_page: 100,
|
||||||
});
|
});
|
||||||
const re = /^kernel-\d+\.\d+\.\d+-[a-f0-9]+$/;
|
const re = /^kernel-\d+\.\d+\.\d+-[a-f0-9]+$/;
|
||||||
const latest = tags.find(t => re.test(t.name))?.name;
|
const latest = releases.find(r => re.test(r.tag_name))?.tag_name;
|
||||||
if (!latest) { core.setFailed('no kernel-*-* tags found'); return; }
|
if (!latest) { core.setFailed('no kernel-*-* tags found'); return; }
|
||||||
|
|
||||||
const cur = (body.match(/^PATCHES_REF="([^"]+)"/m) || [])[1];
|
const cur = (body.match(/^PATCHES_REF="([^"]+)"/m) || [])[1];
|
||||||
|
|||||||
Reference in New Issue
Block a user