linux: add stable staging-nixos workflow

stable counterpart to d28cc2a2f5
This commit is contained in:
zowoq
2026-05-28 09:38:19 +10:00
parent d19f6793f4
commit 10056dd40d
4 changed files with 16 additions and 14 deletions

View File

@@ -102,9 +102,8 @@ async function checkTargetBranch({ github, context, core, dry }) {
changed.attrdiff.changed.includes('nixosTests.simple-container') ||
changed.attrdiff.changed.includes('nixosTests.simple-vm')
// https://github.com/NixOS/nixpkgs/pull/481205#issuecomment-3790123921
// These should go to staging-nixos instead of master,
// but release-xx.xx (not staging-xx.xx) when backported
// https://github.com/NixOS/nixpkgs/pull/521157
// These should go to master and release-xx.xx when backported
let isExemptKernelUpdate = false
if (prInfo.changed_files === 1) {
const changedFiles = (
@@ -115,11 +114,8 @@ async function checkTargetBranch({ github, context, core, dry }) {
).data
isExemptKernelUpdate =
changedFiles.length === 1 &&
(changedFiles[0].filename ===
'pkgs/os-specific/linux/kernel/xanmod-kernels.nix' ||
(base.startsWith('release-') &&
changedFiles[0].filename ===
'pkgs/os-specific/linux/kernel/kernels-org.json'))
changedFiles[0].filename ===
'pkgs/os-specific/linux/kernel/xanmod-kernels.nix'
}
// https://github.com/NixOS/nixpkgs/pull/483194#issuecomment-3793393218
@@ -164,8 +160,10 @@ async function checkTargetBranch({ github, context, core, dry }) {
branchText = '(probably either `staging-nixos` or `staging`)'
} else if (base === 'master') {
branchText = '(probably `staging-nixos`)'
} else if (maxRebuildCount >= 500) {
branchText = `(probably either \`staging-nixos-${split(base).version}\` or \`staging-${split(base).version}\`)`
} else {
branchText = `(probably \`staging-${split(base).version}\`)`
branchText = `(probably \`staging-nixos-${split(base).version}\`)`
}
const body = [
`The PR's base branch is set to \`${base}\`, but this PR rebuilds all NixOS tests.`,