@@ -13,17 +13,25 @@ The workflow automatically creates or updates pull requests in the [wire-server-
1313
1414### Triggers
1515
16- 1 . ** Push to ` offline ` branch** when ` build.json ` is modified
17- 2 . ** Pull requests** that modify ` build.json `
18- 3 . ** Manual dispatch (CLI)** with optional wire-server version pinning
16+ 1 . ** Push to ` main ` branch** when ` build.json ` is modified - automatically syncs to ` offline ` branch
17+ 2 . ** Push to ` offline ` branch** when ` build.json ` is modified
18+ 3 . ** Pull requests** that modify ` build.json `
19+ 4 . ** Manual dispatch (CLI)** with optional wire-server version pinning
1920
2021### Features
2122
22- #### Automatic PR Creation
23+ #### Automatic Build Sync and PR Creation
2324
24- When ` build.json ` is updated on the ` offline ` branch, the workflow:
25- 1 . Updates the wire-build URL in ` wire-server-deploy/offline/tasks/proc_pull_charts.sh `
26- 2 . Creates/updates a PR in wire-server-deploy with version details and commit links
25+ When ` build.json ` is updated on the ` main ` branch:
26+ 1 . The ` sync-build-json.yml ` workflow automatically syncs it to the ` offline ` branch
27+ 2 . This triggers the ` create-deploy-pr.yml ` workflow, which:
28+ - Updates the wire-build URL in ` wire-server-deploy/offline/tasks/proc_pull_charts.sh `
29+ - Creates/updates a PR in wire-server-deploy with version details and commit links
30+ - Uses branch name: ` auto/wire-server-version-bump `
31+
32+ When ` build.json ` is updated directly on the ` offline ` branch (manual changes):
33+ 1 . The ` create-deploy-pr.yml ` workflow triggers directly
34+ 2 . Updates wire-server-deploy and creates a PR (same as above)
2735
2836#### Wire-Server Version Pinning (CLI)
2937
@@ -105,12 +113,37 @@ $ git ls-tree pinned-offline-5.23.0
105113- ` meta.commit ` : Git commit SHA for this chart version
106114- ` meta.commitURL ` : Direct link to the commit on GitHub
107115
116+ ## Workflow Chain
117+
118+ When ` build.json ` is updated on the ` main ` branch, a two-step workflow chain executes:
119+
120+ ```
121+ main: build.json updated
122+ ↓
123+ sync-build-json.yml workflow triggers
124+ ↓
125+ Syncs build.json to offline branch
126+ ↓
127+ create-deploy-pr.yml workflow triggers
128+ ↓
129+ Creates PR in wire-server-deploy
130+ ```
131+
132+ This ensures that production-ready versions on ` main ` are automatically propagated to the offline deployment configuration.
133+
108134## Common Operations
109135
110136### Updating Chart Versions
111137
112- 1 . Modify ` build.json ` with new chart versions
113- 2 . Commit and push to the ` offline ` branch
138+ ** Option 1: Update main branch (recommended for production versions)**
139+ 1 . Modify ` build.json ` with new chart versions on ` main ` branch
140+ 2 . Commit and push to ` main `
141+ 3 . Sync workflow automatically updates ` offline ` branch
142+ 4 . PR creation workflow automatically creates a PR in wire-server-deploy
143+
144+ ** Option 2: Update offline branch directly (for testing or offline-specific changes)**
145+ 1 . Modify ` build.json ` with new chart versions on ` offline ` branch
146+ 2 . Commit and push to ` offline `
1141473 . Workflow automatically creates a PR in wire-server-deploy
115148
116149### Checking Workflow Status
@@ -132,23 +165,23 @@ The workflow uses different branch naming strategies:
132165
133166| Trigger | Branch Name | Behavior |
134167| ---------| -------------| ----------|
135- | Automatic (push to ` build.json ` ) | ` auto/bump- wire-build ` | Reused for all automatic updates |
168+ | Automatic (sync from ` main ` ) | ` auto/wire-server-version-bump ` | Reused for all automatic version bumps |
136169| Pinned version (workflow_dispatch) | ` auto/pin-<branch>-<version> ` | Unique per pinned version |
137170
138- ** For automatic updates (` auto/bump- wire-build ` ):**
171+ ** For automatic updates (` auto/wire-server-version-bump ` ):**
139172
140173After you merge a PR, the next trigger will:
141- 1 . Fetch the existing ` auto/bump- wire-build ` branch
174+ 1 . Fetch the existing ` auto/wire-server-version-bump ` branch
1421752 . Attempt to rebase it on master (which includes the merged changes)
1431763 . If rebase succeeds: update the branch and create a new PR
1441774 . If rebase fails: delete and recreate the branch from master
145178
146- ** Best practice:** Delete the ` auto/bump- wire-build ` branch after merging to ensure clean PR history:
179+ ** Best practice:** Delete the ` auto/wire-server-version-bump ` branch after merging to ensure clean PR history:
147180
148181``` bash
149182# Delete the branch after merging
150183cd wire-server-deploy
151- git push origin --delete auto/bump- wire-build
184+ git push origin --delete auto/wire-server-version-bump
152185```
153186
154187Or enable "Automatically delete head branches" in GitHub repository settings.
0 commit comments