Skip to content

Commit 40a5d48

Browse files
sghosh23claude
andcommitted
optimize offline workflow to require explicit labels for PR builds
- Remove default builds on PRs without labels (saves CI resources) - Add build-default, build-demo, build-min labels for selective builds - Remove 'skip ci' check (no longer needed with label-based approach) - Add 'labeled' trigger to run workflow when labels are added - Update PR template with label documentation - Push to master/develop still runs all builds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 047c183 commit 40a5d48

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

.github/pull_request_template.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ Fixes ${ISSUE_URL}
2121
* [ ] I ran/applied the changes myself, in a test environment.
2222
* [ ] The CI job attached to this repo will test it for me.
2323

24+
#### Offline Build CI (label-based)
25+
Add one or more labels to trigger offline builds:
26+
- `build-default` - Full production build (ansible, terraform, all packages)
27+
- `build-demo` - Demo/WIAB build
28+
- `build-min` - Minimal build (fastest, essential charts only)
29+
- `build-all` - Run all three builds
30+
31+
**Note:** No builds run by default. Add a label to trigger CI.
32+
2433
### Tracking
2534

2635
* [ ] I added a new entry in an appropriate subdirectory of `changelog.d`

.github/workflows/offline.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ jobs:
3232
build-default:
3333
name: Build default profile
3434
if: |
35-
!contains(github.event.head_commit.message, 'skip ci') &&
36-
(github.event_name == 'push' ||
37-
contains(github.event.pull_request.labels.*.name, 'build-all') ||
38-
contains(github.event.pull_request.labels.*.name, 'build-default'))
35+
github.event_name == 'push' ||
36+
contains(github.event.pull_request.labels.*.name, 'build-all') ||
37+
contains(github.event.pull_request.labels.*.name, 'build-default')
3938
runs-on:
4039
group: wire-server-deploy
4140
outputs:
@@ -119,10 +118,9 @@ jobs:
119118
build-demo:
120119
name: Build demo profile
121120
if: |
122-
!contains(github.event.head_commit.message, 'skip ci') &&
123-
(github.event_name == 'push' ||
124-
contains(github.event.pull_request.labels.*.name, 'build-all') ||
125-
contains(github.event.pull_request.labels.*.name, 'build-demo'))
121+
github.event_name == 'push' ||
122+
contains(github.event.pull_request.labels.*.name, 'build-all') ||
123+
contains(github.event.pull_request.labels.*.name, 'build-demo')
126124
runs-on:
127125
group: wire-server-deploy
128126
steps:
@@ -181,10 +179,9 @@ jobs:
181179
build-min:
182180
name: Build min profile
183181
if: |
184-
!contains(github.event.head_commit.message, 'skip ci') &&
185-
(github.event_name == 'push' ||
186-
contains(github.event.pull_request.labels.*.name, 'build-all') ||
187-
contains(github.event.pull_request.labels.*.name, 'build-min'))
182+
github.event_name == 'push' ||
183+
contains(github.event.pull_request.labels.*.name, 'build-all') ||
184+
contains(github.event.pull_request.labels.*.name, 'build-min')
188185
runs-on:
189186
group: wire-server-deploy
190187
steps:

0 commit comments

Comments
 (0)