Skip to content

[FEATURE] Add RC publishing and cleanup to devcontainer release workflow #172

Closed

Description

@c-vigo

Description

Add release-candidate (RC) publishing capability to the devcontainer release workflow, allowing pre-release images to be smoke-tested before the final release. Include cleanup of RC tags after the final release is published.

Problem Statement

The current release workflow publishes the final image directly. There is no pre-release validation step where the built image can be tested in a real downstream CI environment before it reaches users. If the image has a regression that existing tests don't catch (e.g., tool misconfiguration in a CI context), it ships to users.

Proposed Solution

  • Add RC publishing capability (new workflow release-rc.yml or new job in existing release.yml):
    • Triggered manually or automatically when CI passes on a release branch PR
    • Publishes X.Y.Z-rc1 to GHCR (ghcr.io/vig-os/devcontainer:X.Y.Z-rc1)
    • Supports incrementing RC number (rc1, rc2, etc.)
  • Add RC cleanup step to the final release publish job:
    • After X.Y.Z is published, delete all X.Y.Z-rc* tags from GHCR via gh api
  • RC tags follow SemVer pre-release format

Alternatives Considered

See parent issue #169 for full alternatives analysis.

Additional Context

This is sub-issue 3 of 4 for #169 (Phase 1). Can be worked in parallel with #170 (smoke-test repo bootstrap).

Dependency graph:

The devcontainer repo's existing release workflow is at .github/workflows/release.yml. The template release workflow at assets/workspace/.github/workflows/release.yml is not modified by this issue.

Impact

  • Backward compatible. Adds new capability to the release workflow without changing the existing release flow.
  • Minor GHCR storage cost for RC images (cleaned up after final release).

Changelog Category

Added

Acceptance Criteria

  • Can publish X.Y.Z-rc1 to GHCR from a release branch
  • Can publish incremented RCs (rc2, rc3, etc.)
  • Candidate tags (X.Y.Z-rc*) are retained after final release
  • Existing release workflow is not broken
  • TDD compliance (see .cursor/rules/tdd.mdc)

Activity

  1. added this to the Backlog milestone on Feb 24, 2026
  2. added
    feature
    area:ci
    effort:medium
    semver:minor
    on Feb 24, 2026
  3. modified the milestones: Backlog, 0.3 on Mar 3, 2026
  4. self-assigned this
    on Mar 4, 2026
  5. c-vigo commented on Mar 4, 2026

    @c-vigo
    ContributorAuthor

    Design

    Issue: #172
    Branch: feature/172-rc-publishing-cleanup-release-workflow

    Decisions Confirmed

    • Extend existing .github/workflows/release.yml (no new workflow file).
    • Add release-kind input with default candidate.
    • Candidate runs infer the next available RC number automatically (X.Y.Z-rcN).
    • Every candidate publish creates and pushes a git tag (X.Y.Z-rcN).
    • Candidate tags are retained (no cleanup on final release).

    Architecture

    • Keep current validate -> finalize -> build-and-test -> publish -> rollback structure.
    • Add mode-aware behavior in validate and publish:
      • candidate mode computes publish_version = X.Y.Z-rcN using next available N from existing tags.
      • final mode keeps current publish_version = X.Y.Z behavior.

    Data Flow

    • workflow_dispatch inputs feed validate.
    • validate outputs include mode and computed publish version.
    • build-and-test remains unchanged and uses base X.Y.Z inputs for branch/release context.
    • publish uses computed publish version for tag and image manifest naming.

    Publish Rules

    • Candidate mode:
      • Create/push git tag X.Y.Z-rcN.
      • Publish arch images and multi-arch manifest for X.Y.Z-rcN.
      • Do not update latest.
    • Final mode:
      • Preserve existing behavior for git tag X.Y.Z, manifest X.Y.Z, and conditional latest.

    Error Handling and Safety

    • Next-RC inference includes a pre-push collision check; if race detected, fail with retry guidance.
    • Rollback path supports deleting candidate tag when candidate publish partially failed.
    • Final release path remains default-safe via explicit mode checks around candidate logic.

    Testing Strategy (TDD-aligned)

    • Candidate mode with no prior tags infers rc1.
    • Candidate mode with existing tags infers next number (rc2, rc3, ...).
    • Candidate mode creates git tag and publishes candidate manifest without touching latest.
    • Final mode regression checks confirm existing release behavior remains intact.
    • Workflow YAML/lint validation and targeted CI verification required before merge.
  6. added a commit that references this issue on Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:cieffort:mediumfeaturesemver:minor

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions