fix(ci): build dev images without repository write access
All checks were successful
Build and Release FEDEO / verify (push) Successful in 25s
Build and Release FEDEO / build-and-release (push) Successful in 5m54s

This commit is contained in:
2026-09-20 18:22:17 +02:00
parent 68c0a224e5
commit bb94e73229
5 changed files with 177 additions and 30 deletions

View File

@@ -15,6 +15,9 @@ export async function acquireLock({ runGit = git, wait = sleep, attempts = 480,
runGit(['push', `--force-with-lease=${ref}:`, 'origin', `${lockSha}:${ref}`]);
return () => runGit(['push', `--force-with-lease=${ref}:${lockSha}`, 'origin', `:${ref}`]);
} catch (error) {
if (/403|forbidden|permission denied|authentication failed/i.test(String(error.stderr || error.message))) {
throw new Error('Die main-Release-Sperre benötigt Git-Schreibrechte. RELEASE_TOKEN (Secret oder Variable) oder den bisherigen vars.CI_TOKEN mit write:repository und Zugriff auf automation/release-lock konfigurieren.');
}
if (!runGit(['ls-remote', 'origin', ref])) throw error;
}
}