Repository navigation
ci: deploy each egress release to lantern-cloud's buckets - #458
Conversation
After publishing a release, upload it, packaged the way lantern-cloud's deploy-egress.yml packages it, to the staging and prod egress-artifacts buckets, where each host's lantern-autoupdate installs it within 5 minutes. This is how lantern-box ships its image, and it means an egress change no longer needs a deploy/egress/VERSION bump in lantern-cloud. It authenticates through lantern-cloud's GitHub WIF provider as gha-unbounded-egress, which can only write those buckets and only from main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014raE9kFV5Ton7jzgNi8ADf
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe release workflow now deploys verified amd64 and arm64 binaries to staging and production egress-artifacts buckets. It packages each binary with a ChangesEgress Release Deployment
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant GitHubActions as GitHub Actions deploy job
participant BuildArtifact as Build artifact
participant WorkloadIdentity as Google Cloud workload identity
participant EgressBucket as Egress-artifacts bucket
GitHubActions->>BuildArtifact: Download architecture build artifact
BuildArtifact-->>GitHubActions: Return binary and checksum
GitHubActions->>GitHubActions: Verify checksum and package binary
GitHubActions->>WorkloadIdentity: Authenticate for the target environment
WorkloadIdentity-->>GitHubActions: Provide authenticated access
GitHubActions->>EgressBucket: Upload package and checksum aliases
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No confirmed issue blocks merging. The upload and host-side checksum behavior remain untested, so confirm the four deploy jobs and host update after the cloud dependency is applied. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Release automation can now directly publish updates for staging and production hosts. Publication can complete only in part, while the cloud authorization policies and updater recovery behavior needed to bound that risk are not available for review. No exploitable security defect was confirmed. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🟡 Changes recommended
Generated checksum manifests reference runner-local or mismatched archive paths, preventing standard post-download verification.
1 open finding
What changed in this PR
Adds automated deployment of released egress binaries to staging and production artifact buckets.
Changes:
- Packages amd64/arm64 releases for Lantern autoupdate.
- Authenticates via Workload Identity Federation and uploads to both environments.
| File | Description |
|---|---|
.github/workflows/release-egress.yml |
Adds the matrix deployment job and updates workflow documentation. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| sha256sum "$GITHUB_WORKSPACE/build/$VERSION.tar.gz" > "build/$VERSION.tar.gz.sha256" | ||
| ln "build/$VERSION.tar.gz" "build/latest.tar.gz" | ||
| ln "build/$VERSION.tar.gz.sha256" "build/latest.tar.gz.sha256" |

context
Shipping an egress change currently also needs a
deploy/egress/VERSIONbump PR in lantern-cloud. This adds adeployjob torelease-egress.ymlthat ships the release itself, the way lantern-box's CI pushessing-box:latestinto lantern-cloud.Depends on getlantern/lantern-cloud#3545 being merged and applied in staging and prod first. That PR creates the
gha-unbounded-egressservice account this job authenticates as.what the deploy job does
release, only on runs that publish (the samerelease == 'true'gate).{staging, prod}×{amd64, arm64}withfail-fast: false, so one environment failing doesn't cancel the others.buildjob's artifact and re-checks its.sha256.deploy-egress.ymldid:<version>/bin/egress,<version>/REVISION, alatestsymlink,<version>.tar.gzandlatest.tar.gz, each with a.sha256.gha-unbounded-egress, which can write only theegress-artifactsbucket and only fromrefs/heads/main.lantern-cloud[-staging]-egress-artifacts/egress/linux-<arch>/. Hosts'lantern-autoupdateinstalls it within 5 minutes.contents: readandid-token: write. The version reaches the shell only throughenv, and it was already validated in theversionjob.It also updates the header comment, which still said lantern-cloud's cloud-init fetched releases at boot.
not changed
Merges still produce a version-bump PR like #453, because branch protection blocks the workflow's push to
main. Removing that step would need an app on the ruleset's bypass list.testing
actionlintreports only a pre-existing SC2129 style note in theversionstep.mainafter lantern-cloud#3545 is applied. Verify it on the first release after merging:deployjobs succeedegress-us-east's/opt/lantern/egress/latest/REVISIONshows the new tag within 5 minutes🤖 Generated with Claude Code
https://claude.ai/code/session_014raE9kFV5Ton7jzgNi8ADf
Summary by CodeRabbit