Skip to content

ci: drive stable Docker/deploy builds off release publish#4484

Merged
dtunikov merged 4 commits into
mainfrom
release-publish-driven-tags
Jun 24, 2026
Merged

ci: drive stable Docker/deploy builds off release publish#4484
dtunikov merged 4 commits into
mainfrom
release-publish-driven-tags

Conversation

@dtunikov

Copy link
Copy Markdown
Collaborator

What

Switch the Stable Docker images and Update Deployment tags workflows from the push: tags trigger to release: published.

Why

Tagging and publishing the GitHub Release were decoupled. Tags were pushed independently, so the release-drafter draft could sit unpublished even though Docker images were already built:

  • v0.36.28 sat as a draft for 4 days (images built 06-15, published 06-19).
  • v0.36.29 was never published — images built 06-19, draft only published manually on 06-23.

Triggering off release: published makes publishing the draft the single source of truth: GitHub natively creates the vX.Y.Z tag at the release's target commit, which fires both workflows.

Notes

  • stable-docker.yml needs no other change — github.ref_name resolves to the tag name on both event types, so SHA_SHORT: stable-${{ github.ref_name }} still yields stable-vX.Y.Z and actions/checkout checks out the tag automatically.
  • update-docker-compose-stable.yaml keeps workflow_dispatch; its releases/latest lookup returns the just-published release.
  • Behavior change: bare git push origin vX.Y.Z no longer triggers builds — you must publish a release.
  • GITHUB_TOKEN caveat: release: published fires on human publishes (the current flow). If release-drafter is later set to auto-publish via the default GITHUB_TOKEN, that bot event would not trigger these downstream workflows (GitHub's recursion guard).

🤖 Generated with Claude Code

Switch the Stable Docker images and deployment-tag update workflows from
the `push: tags` trigger to `release: published`.

Previously tags were pushed independently of publishing the
release-drafter draft, so the GitHub Release could sit unpublished even
though images were already built (e.g. v0.36.28 sat as a draft for days,
v0.36.29 was never published). Triggering off `release: published` makes
publishing the draft the single source of truth: GitHub creates the tag
at the release target commit, which fires both workflows.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@dtunikov
dtunikov requested a review from a team as a code owner June 24, 2026 10:32
@claude

claude Bot commented Jun 24, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@masterashu masterashu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since you're changin

Comment thread .github/workflows/stable-docker.yml Outdated
Comment thread .github/workflows/update-docker-compose-stable.yaml Outdated
Address review: on release events github.ref_name is ambiguous, so read
the tag explicitly from github.event.release.tag_name. Pin the
stable-docker checkout to the released tag so the image is built from the
exact released commit, and prefer the event tag in the deploy-tag
workflow (falling back to releases/latest for manual dispatch).

Co-Authored-By: Claude Opus 4.8 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the release automation so stable Docker image builds and deployment tag updates are triggered from release: published events instead of push tag events, making “publishing a release” the single source of truth for stable artifacts.

Changes:

  • Switch Stable Docker images workflow trigger from push: tags to release: published, and explicitly build from the release tag.
  • Switch Update Deployment tags workflow trigger from push: tags to release: published while keeping workflow_dispatch, and prefer the release payload’s tag_name when available.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/update-docker-compose-stable.yaml Trigger off release: published and derive latest_tag from the release event (with fallback to releases/latest).
.github/workflows/stable-docker.yml Trigger off release: published and check out/build using the release tag name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/update-docker-compose-stable.yaml Outdated
Comment thread .github/workflows/stable-docker.yml Outdated
dtunikov and others added 2 commits June 24, 2026 13:08
actions/checkout defaults to github.sha, which on a release event already
points at the tagged commit, so the explicit ref is unnecessary.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
2320 2 2318 204
View the top 2 failed test(s) by shortest run time
github.com/PeerDB-io/peerdb/flow/e2e::TestApiMongo
Stack Traces | 0.01s run time
=== RUN   TestApiMongo
=== PAUSE TestApiMongo
=== CONT  TestApiMongo
--- FAIL: TestApiMongo (0.01s)
github.com/PeerDB-io/peerdb/flow/e2e::TestApiMongo/TestResyncWithSnapshotConfigOnPausedPipe
Stack Traces | 6.11s run time
=== RUN   TestApiMongo/TestResyncWithSnapshotConfigOnPausedPipe
=== PAUSE TestApiMongo/TestResyncWithSnapshotConfigOnPausedPipe
=== CONT  TestApiMongo/TestResyncWithSnapshotConfigOnPausedPipe
    api_test.go:1766: WaitFor wait for mirror to be in cdc 2026-06-24 11:17:21.528146336 +0000 UTC m=+324.656051336
    api_test.go:1790: WaitFor wait for mirror to pause 2026-06-24 11:17:21.538122888 +0000 UTC m=+324.666027878
2026/06/24 11:17:21 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_wkzstjpj.test_nullengine
    api_test.go:1816: 
        	Error Trace:	.../flow/e2e/api_test.go:1816
        	Error:      	Received unexpected error:
        	            	rpc error: code = FailedPrecondition desc = failed to validate source connector mongo: oplog retention must be set to >= 24 hours, but got 23.000000
        	Test:       	TestApiMongo/TestResyncWithSnapshotConfigOnPausedPipe
    api_test.go:51: begin tearing down postgres schema api_m6l0322x
--- FAIL: TestApiMongo/TestResyncWithSnapshotConfigOnPausedPipe (6.11s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: Test_MySQL_BinlogIncident failed with a transient MySQL handshake EOF ("connection was bad") while connecting to a freshly-started testcontainer, an infrastructure/timing flake unrelated to the PR's CI/deploy-config-only changes.
Confidence: 0.88

✅ Automatically retrying the workflow

View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: TestApiMongo/TestResyncWithSnapshotConfigOnPausedPipe failed on mongo oplog-retention validation (got 23h) because a parallel sibling test (TestMongoDBOplogRetentionValidation) temporarily lowers the server-wide oplogMinRetentionHours to 23, a shared-global-state race between parallel subtests rather than a real bug.
Confidence: 0.92

✅ Automatically retrying the workflow

View workflow run

@dtunikov
dtunikov merged commit c03831f into main Jun 24, 2026
15 checks passed
@dtunikov
dtunikov deleted the release-publish-driven-tags branch June 24, 2026 11:37
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.

3 participants