Skip to content

fix(ci): preserve deployment target workflows - #39

Merged
theredspoon merged 1 commit into
pipeline-controlfrom
fix/preserve-deployment-workflows
Jul 1, 2026
Merged

theredspoon merged 1 commit into
pipeline-controlfrom
fix/preserve-deployment-workflows

Conversation

@theredspoon

Copy link
Copy Markdown
Owner

Summary

  • fetch the deployment target branch before creating the mirror commit
  • restore .github/workflows from deployment-target so target release/validation workflows remain authoritative
  • keep the reviewed source SHA and regression-check skip marker behavior from the prior control-plane fix

Validation

  • bash scripts/test-auto-ff-matrix-pilot-sync-workflow.sh
  • bash scripts/test-sync-upstream-workflow.sh
  • bash scripts/test-pipeline-control-sync-workflow.sh
  • git diff --check

Overlay .github/workflows from the deployment target branch before creating the mirror commit so source-repo CI workflows do not replace deployment-target release and validation workflows.

Validation:

- bash scripts/test-auto-ff-matrix-pilot-sync-workflow.sh

- bash scripts/test-sync-upstream-workflow.sh

- bash scripts/test-pipeline-control-sync-workflow.sh

- git diff --check

[skip-regression-check]
@github-actions github-actions Bot added size: S Changed-line size classification scope: ci risk: medium Risk classification contributor: core Contributor history classification and removed size: S Changed-line size classification labels Jul 1, 2026
@theredspoon
theredspoon merged commit de9a518 into pipeline-control Jul 1, 2026
16 checks passed
@theredspoon
theredspoon deleted the fix/preserve-deployment-workflows branch July 1, 2026 15:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 83d5b36e68

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

set -euo pipefail
git fetch deployment_mirror "refs/heads/${TARGET_BRANCH}:refs/remotes/deployment_mirror/${TARGET_BRANCH}"
rm -rf .github/workflows
git checkout "refs/remotes/deployment_mirror/${TARGET_BRANCH}" -- .github/workflows

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove source-only workflow entries from the index

When the source branch has a workflow file that deployment-target deleted or renamed, this checkout runs in Git's default overlay mode (git checkout -h documents --overlay as the default), so it restores target files but does not remove source-only entries that are already in the index. The preceding rm -rf only deletes the worktree copy, and the later git write-tree builds the mirror commit from the index, so those source workflows still get pushed to the deployment mirror instead of leaving the target workflows authoritative.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core Contributor history classification risk: medium Risk classification scope: ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant