feat(ci): add next build and RC release workflows

Replace generic staging builds with traceable next images and reviewed RC releases.
This commit is contained in:
Andras Bacsai
2026-08-19 12:22:51 +02:00
parent c3a86b054a
commit bb1d3f13f2
7 changed files with 508 additions and 146 deletions
+44 -5
View File
@@ -25,7 +25,7 @@ it('publishes v4 branch builds under the commit sha with a traceable internal ve
->and($constants)
->toContain("'version' => env('COOLIFY_VERSION') ?: '4.3.10'")
->and($versions['coolify']['v4']['version'])->toBe('4.3.10')
->and($versions['coolify']['nightly']['version'])->toBe('4.3.11')
->and($versions['coolify']['nightly']['version'])->toBe('4.4-rc.1')
->and($nightlyVersions)->toBe($versions);
});
@@ -34,6 +34,12 @@ it('orders a maintenance development build before its stable release', function
->and(version_compare('4.3.2', '4.3.2-dev.d64cbda3e', '>'))->toBeTrue();
});
it('orders rolling and exact release candidates before the stable release', function () {
expect(version_compare('4.4-rc.1.d64cbda', '4.4-rc.1', '<'))->toBeTrue()
->and(version_compare('4.4-rc.1', '4.4-rc.2', '<'))->toBeTrue()
->and(version_compare('4.4-rc.2', '4.4.0', '<'))->toBeTrue();
});
it('requires a reviewed draft release before building a stable version', function () {
$workflow = file_get_contents(dirname(__DIR__, 2).'/.github/workflows/coolify-release.yml');
@@ -104,12 +110,45 @@ it('generates the production changelog from main', function () {
->not->toContain('v4.x');
});
it('excludes main from staging builds', function () {
$workflow = file_get_contents(dirname(__DIR__, 2).'/.github/workflows/coolify-staging-build.yml');
it('publishes traceable rolling builds from next without creating an exact rc tag', function () {
$workflow = file_get_contents(dirname(__DIR__, 2).'/.github/workflows/coolify-next-build.yml');
expect($workflow)
->toContain(' - main')
->not->toContain(' - v4.x');
->toContain('name: Build Coolify Next')
->toContain('branches: [next]')
->toContain('group: coolify-next-build')
->toContain("jq -r '.coolify.nightly.version' versions.json")
->toContain('VERSION="${RC_VERSION}.${SHORT_SHA}"')
->toContain('COOLIFY_VERSION=${{ needs.prepare.outputs.version }}')
->toContain('--tag "${IMAGE}:sha-${SHA}"')
->toContain('--tag "${IMAGE}:${VERSION}"')
->toContain('--tag "${IMAGE}:next"')
->not->toContain('--tag "${IMAGE}:${RC_VERSION}"')
->not->toContain('--tag "${IMAGE}:latest"');
});
it('requires a reviewed draft prerelease before publishing an exact rc', function () {
$workflow = file_get_contents(dirname(__DIR__, 2).'/.github/workflows/coolify-rc-release.yml');
expect($workflow)
->toContain('name: Release Coolify RC')
->toContain('run-name: ${{ inputs.tag }}')
->toContain("github.ref != 'refs/heads/next'")
->toContain('group: coolify-rc-release')
->toContain('^v[0-9]+\\.[0-9]+-rc\\.[0-9]+$')
->toContain("jq -r '.coolify.nightly.version' versions.json")
->toContain('release.draft')
->toContain('!release.prerelease')
->toContain('release.body?.trim()')
->toContain('revalidate:')
->toContain('needs: [validate, build, revalidate]')
->toContain('COOLIFY_VERSION=${{ needs.validate.outputs.version }}')
->toContain('--tag "${IMAGE}:${VERSION}"')
->toContain('--tag "${IMAGE}:next"')
->toContain('prerelease: true')
->toContain('actions/github-script@v8')
->not->toContain('--tag "${IMAGE}:latest"')
->not->toContain('environment:');
});
it('rebuilds stable images and publishes the reviewed draft after both architectures succeed', function () {