ci: restructure release flow to workflow_dispatch #4

Merged
crypt merged 1 commit from ci/release-flow-restructure into main 2026-10-02 02:40:55 +00:00
Owner

Problem

The current release flow is tag-push-triggered: make release VERSION=x.y.z pushes a git tag, which triggers CI to build and push images. But PR #3 bumped Chart.yaml to 0.6.5 in the feature branch itself — so the moment it merged to main, ArgoCD auto-synced and tried to pull 0.6.5 images that didn't exist yet. Result: ImagePullBackOff for 3 pods until CI finished.

Fix

Switch the release workflow from tag-push trigger to manual workflow_dispatch with a version input. The workflow now:

  1. Builds and tests plugins + controller
  2. Builds and pushes all five OCI images (tagged with the release version)
  3. After images are in the registry: bumps chart/Chart.yaml (version + appVersion), commits the bump to main, and tags it vX.Y.Z
  4. Packages and publishes the Helm chart
  5. Creates the Forgejo release

The chart version bump lands on main only after images exist, so ArgoCD auto-sync never sees an image tag that doesn't exist yet.

Changes

  • .forgejo/workflows/release.yml: Rewritten from on: push: tags to on: workflow_dispatch with version input. The chart job now checks out main (not the tag), bumps Chart.yaml, commits, pushes, and creates the tag. Re-runnable — if Chart.yaml is already at the target version, the bump/commit/tag step is skipped.
  • Makefile: make release VERSION=x.y.z now calls the Forgejo API to dispatch the workflow instead of pushing a tag. Requires FORGEJO_TOKEN (same token used for image pushes). Comments updated.

Going forward

  • Feature PRs: do NOT bump Chart.yaml. The release workflow handles versioning.
  • To release: make release VERSION=0.7.0 (or trigger from the Forgejo UI: Actions → Run workflow).
  • Re-run on failure: re-dispatch with the same version. Image pushes are idempotent; if the chart bump already landed, it's skipped.
## Problem The current release flow is tag-push-triggered: `make release VERSION=x.y.z` pushes a git tag, which triggers CI to build and push images. But PR #3 bumped `Chart.yaml` to `0.6.5` in the feature branch itself — so the moment it merged to main, ArgoCD auto-synced and tried to pull `0.6.5` images that didn't exist yet. Result: `ImagePullBackOff` for 3 pods until CI finished. ## Fix Switch the release workflow from tag-push trigger to **manual `workflow_dispatch`** with a version input. The workflow now: 1. Builds and tests plugins + controller 2. Builds and pushes all five OCI images (tagged with the release version) 3. **After images are in the registry**: bumps `chart/Chart.yaml` (version + appVersion), commits the bump to main, and tags it `vX.Y.Z` 4. Packages and publishes the Helm chart 5. Creates the Forgejo release The chart version bump lands on main **only after images exist**, so ArgoCD auto-sync never sees an image tag that doesn't exist yet. ## Changes - **`.forgejo/workflows/release.yml`**: Rewritten from `on: push: tags` to `on: workflow_dispatch` with `version` input. The `chart` job now checks out `main` (not the tag), bumps `Chart.yaml`, commits, pushes, and creates the tag. Re-runnable — if `Chart.yaml` is already at the target version, the bump/commit/tag step is skipped. - **`Makefile`**: `make release VERSION=x.y.z` now calls the Forgejo API to dispatch the workflow instead of pushing a tag. Requires `FORGEJO_TOKEN` (same token used for image pushes). Comments updated. ## Going forward - **Feature PRs**: do NOT bump `Chart.yaml`. The release workflow handles versioning. - **To release**: `make release VERSION=0.7.0` (or trigger from the Forgejo UI: Actions → Run workflow). - **Re-run on failure**: re-dispatch with the same version. Image pushes are idempotent; if the chart bump already landed, it's skipped.
ci: restructure release flow to workflow_dispatch
All checks were successful
/ detect (pull_request) Successful in 3s
/ commit-check (pull_request) Successful in 2s
/ chart (pull_request) Successful in 3s
/ controller (pull_request) Successful in 14s
/ plugin (pull_request) Successful in 2m10s
6782a19d17
Switch from tag-push trigger to manual workflow_dispatch. The workflow
builds and pushes images first, then bumps Chart.yaml on main and tags
the bump commit. This ensures ArgoCD never sees an image tag that
doesn't exist yet — the version bump lands only after images are in the
registry.

Feature PRs should no longer bump Chart.yaml; the release workflow
handles versioning. The Makefile release target now calls the Forgejo
API to dispatch the workflow instead of pushing a tag.
crypt merged commit 1396ec9def into main 2026-10-02 02:40:55 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crypt/k8s-mcsg-uhc!4
No description provided.