ci: gate dogfood workflow drift and sync promote.yaml - #154
Merged
Merged
Conversation
Add a Workflow Drift Check job to PR validation that rebuilds the CLI, regenerates the dogfood workflows from .github/manifest.yaml, and fails if the committed files differ from generator output. Sync promote.yaml, which had drifted across merged changes (source_image_tag, source_image_digest outputs, and mode injected via env). Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
cascade dogfoods its own generated GitHub Actions workflows under
.github/workflows/, butpromote.yamlhad drifted from generator output across several merged changes, and no CI check caught it:source_image_tagpreflight output (missing)source_image_digestpreflight output (missing)modeinjected viaenv:instead of inline interpolation in the validate step (missing)Fix
.github/manifest.yamlwithcascade generate-workflow --force. Onlypromote.yamlwas stale (orchestrate.yaml and the manage-release composite action were already in sync). The synced file now carries the three items above..github/workflows/pr.yamlthat builds the CLI, runscascade generate-workflow --config .github/manifest.yaml --force, thengit diff --exit-code -- .github/workflows/ .github/actions/, so CI fails whenever committed dogfood workflows no longer match generator output. The job is wired into the PR Gate aggregate.Verification
go build ./... && go test ./...green (1231 tests),golangci-lint run ./...clean,actionlint .github/workflows/pr.yamlexit 0.New required action pins reuse the existing repo-pinned SHAs for checkout and setup-go.