Skip to content

Commit 0febd29

Browse files
authored
chore: Allow individual targets with manual_msi_build (#3226)
* chore: Allow individual targets with manual_msi_build * Claude fix
1 parent fcd85f5 commit 0febd29

1 file changed

Lines changed: 27 additions & 8 deletions

File tree

.github/workflows/manual_msi_build.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,38 @@ on:
66
description: "Collector Version"
77
required: true
88
default: "v0.0.1"
9+
build_amd64:
10+
description: "Build amd64 MSI"
11+
type: boolean
12+
default: true
13+
build_arm64:
14+
description: "Build arm64 MSI"
15+
type: boolean
16+
default: true
917

1018
jobs:
19+
setup:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
matrix: ${{ steps.set-matrix.outputs.matrix }}
23+
steps:
24+
- id: set-matrix
25+
shell: bash
26+
run: |
27+
matrix='{"include":[]}'
28+
if [ "${{ inputs.build_amd64 }}" = "true" ]; then
29+
matrix=$(echo $matrix | jq -c '.include += [{"arch":"amd64","msi_name":"observiq-otel-collector.msi","msi_arch":"x64"}]')
30+
fi
31+
if [ "${{ inputs.build_arm64 }}" = "true" ]; then
32+
matrix=$(echo $matrix | jq -c '.include += [{"arch":"arm64","msi_name":"observiq-otel-collector-arm64.msi","msi_arch":"arm64"}]')
33+
fi
34+
echo "matrix=$matrix" >> $GITHUB_OUTPUT
35+
1136
build-msi:
37+
needs: setup
1238
runs-on: windows-2022
1339
strategy:
14-
matrix:
15-
include:
16-
- arch: amd64
17-
msi_name: observiq-otel-collector.msi
18-
msi_arch: x64
19-
- arch: arm64
20-
msi_name: observiq-otel-collector-arm64.msi
21-
msi_arch: arm64
40+
matrix: ${{ fromJSON(needs.setup.outputs.matrix) }}
2241
steps:
2342
- name: Checkout Sources
2443
uses: actions/checkout@v4

0 commit comments

Comments
 (0)