Skip to content

[FEATURE] Automated RC deploy-and-test via PR in smoke-test repo #258

@c-vigo

Description

@c-vigo

Description

Refurbish repository-dispatch.yml in the smoke-test repo so that each RC publish triggers a full deploy-test-report cycle: the workflow fetches the RC image, re-deploys the workspace via install.sh, commits the changes via a PR, lets PR-triggered CI validate the deployment, and auto-merges on success. Drop CHANGELOG from the smoke-test repo entirely.

Problem Statement

The current repository-dispatch.yml (#169) validates the dispatch payload and calls ci.yml / ci-container.yml via workflow_call, but:

  1. No deployment -- it runs CI against whatever code is already in the repo. If the RC ships updated template files, they are never deployed or tested.
  2. No commit trail -- nothing records which RC was tested or what changed.
  3. No tracking mechanism -- CHANGELOG doesn't make sense for a bot-only repo that receives only automated RC deployments.
  4. Bug -- line 82 references needs.ci.container.result (typo: should be needs.ci-container.result).

Proposed Solution

Workflow flow:

repository_dispatch (rc_tag)
    │
    ├── validate: extract & validate rc_tag
    │
    ├── deploy:
    │   ├── close stale RC PRs
    │   ├── install.sh --version <rc_tag> --smoke-test --force .
    │   ├── write RC tag to .vig-os (from #257)
    │   ├── detect changes (git diff)
    │   ├── if changes: create branch rc/<rc_tag>, commit, push, create PR
    │   └── enable auto-merge
    │
    ├── ci-container: workflow_call with explicit rc_tag
    │   (PR-triggered ci.yml handles bare-runner validation)
    │
    └── summary: report results

Design decisions:

  1. PR-based deploy -- each RC deployment creates a branch (rc/<rc-tag>) and PR to main. CI triggers naturally on the PR. Auto-merge on success. PR history = audit trail.
  2. No CHANGELOG -- commit history is the log. Each merged PR shows which RC was deployed. GitHub Actions history shows test results. If queryable tags are wanted later, the workflow can tag successful merges.
  3. Inline ci-container kept -- GitHub Actions container: directive evaluates at workflow parse time, so PR-triggered ci-container.yml can't read .vig-os dynamically. The inline workflow_call with explicit RC tag is the pragmatic solution.
  4. Stale PR cleanup -- before creating a new RC PR, close any open rc-deploy labeled PRs.

Files to change:

  • Rewrite: assets/smoke-test/.github/workflows/repository-dispatch.yml -- add deploy job, PR creation, auto-merge, fix typo
  • Update: assets/smoke-test/README.md -- document new flow, no CHANGELOG, how to check status

Alternatives Considered

  • Direct commit to main -- simpler but less traceable. PR-based flow was chosen for audit trail and CI integration.
  • Inline CI via workflow_call only -- workflow_call uses the caller's ref, not the newly deployed code. PR-triggered CI tests the actual deployed files.
  • CHANGELOG / deployment log file -- adds maintenance burden for a bot-only repo. Commit + PR history provides the same information with zero overhead.

Additional Context

Impact

  • Who benefits: Release operators. RC testing becomes fully automated with a clear pass/fail signal (merged PR = passed).
  • Compatibility: Backward compatible. Only changes the smoke-test repo workflow and assets.

Changelog Category

Added

Metadata

Metadata

Assignees

Labels

area:ciCI/CD, GitHub Actions, workflowsarea:testingTest infrastructure, BATS, pytesteffort:medium1-4 hoursfeatureNew feature or requestsemver:minorNew feature, backward-compatible

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions