Skip to content

fix: resolve 3 workflow automation bugs causing daily CI failures#27

Merged
mrjasonroy merged 1 commit intomainfrom
fix/workflow-automation
Feb 20, 2026
Merged

fix: resolve 3 workflow automation bugs causing daily CI failures#27
mrjasonroy merged 1 commit intomainfrom
fix/workflow-automation

Conversation

@mrjasonroy
Copy link
Copy Markdown
Owner

What broke and why

Bug 1: Semver caret prefix caused false 'update needed' every day

require().dependencies.next returns ^16.1.6 but npm view next version returns 16.1.6. String comparison always evaluated to true, creating a new branch and running tests daily even when already on the latest version.

Fix: Strip non-numeric prefix before comparing (.replace(/^[^0-9]*/, '')).

Bug 2: Docker Compose Redis setup failed in version-check workflow

The workflow used docker compose up -d && sleep 5 which is fragile — Redis wasn't ready in time, causing blank [Redis] Error: connection failures. Also hardcoded docker exec nextjs-cache-redis which doesn't exist in the CI environment.

Fix: Replaced with GitHub Actions service containers (same pattern as ci.yml), with proper health checks. Updated Redis flush to use redis-cli -h localhost FLUSHALL.

Same fix applied to catch-up-release.yml.

Bug 3: Double-publish in publish.yml

publish.yml triggered on both push: tags and release: published. The tag-push run creates a GitHub release at the end (gh release create), which re-triggers the workflow — second run fails with npm error 'version already published'.

Fix: Removed release: published trigger. Tag push alone is sufficient.


Analysis and fix by Iris + Claude Code

1. Strip semver range prefix in version comparison (nextjs-version-check)
   - `require().dependencies.next` returns "^16.1.6" but npm view returns "16.1.6"
   - The caret prefix made the comparison always report "update needed"
   - Fix: strip non-numeric prefix before comparing

2. Replace Docker Compose with service containers (nextjs-version-check, catch-up-release)
   - `docker compose up -d && sleep 5` is fragile and caused Redis connection errors
   - `docker exec nextjs-cache-redis` references a container name that doesn't exist in CI
   - Fix: use GitHub Actions service containers with health checks, matching ci.yml pattern

3. Remove double-trigger in publish.yml
   - Triggered on both `push: tags` and `release: published`
   - Tag push runs the workflow, which creates a GitHub release at the end
   - That release re-triggers the workflow, which fails on duplicate npm publish
   - Fix: remove `release: published` trigger; tag push is sufficient

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@mrjasonroy mrjasonroy merged commit 889782e into main Feb 20, 2026
7 checks passed
@mrjasonroy mrjasonroy deleted the fix/workflow-automation branch February 20, 2026 01:50
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.

1 participant