Skip to content

Patch upstream tags oldest-first in auto-patch workflow - #1

Merged
duplabe merged 1 commit into
mainfrom
fix/auto-patch-oldest-first
Jun 9, 2026
Merged

Patch upstream tags oldest-first in auto-patch workflow#1
duplabe merged 1 commit into
mainfrom
fix/auto-patch-oldest-first

Conversation

@duplabe

@duplabe duplabe commented Jun 9, 2026

Copy link
Copy Markdown

Summary

  • Flip the iteration order in .github/workflows/auto-patch-upstream.yml from newest-first (sort -rV) to oldest-first (sort -V).
  • MAX_PATCHES=1 is unchanged — still one tag per workflow run.

Why

When multiple upstream releases land between scheduled runs, the previous order patched the newest tag first and then walked backwards on each subsequent run. Each patched branch triggers Bitrise CI to update the deployment repo's default to that branch's version, so the default ended up regressing to the oldest tag of the batch.

Iterating ascending means the last branch pushed during a catch-up sequence is always the newest tag, so the deployment default lands on the newest.

Test plan

  • Manually trigger the workflow (workflow_dispatch) and confirm the next unpatched tag chosen is the oldest one missing.
  • Verify the patched branch releases/v<oldest-missing>-bitrise is created and pushed.

🤖 Generated with Claude Code

When a backlog accumulates between scheduled runs, the previous
newest-first order caused each subsequent run to patch an older tag,
which the deployment repo would then adopt as default via Bitrise CI.
Iterating ascending ensures the last patched branch is the newest tag.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@duplabe
duplabe merged commit 63deb85 into main Jun 9, 2026
2 checks passed
@duplabe
duplabe deleted the fix/auto-patch-oldest-first branch June 9, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants