Skip to content

Commit b007895

Browse files
committed
matrix values cannot contain runtime computed val
1 parent aa71412 commit b007895

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

.github/workflows/collector-builder.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
outputs:
3232
build-image: ${{ steps.builder-tag.outputs.build-image || false }}
3333
collector-builder-tag: ${{ steps.builder-tag.outputs.collector-builder-tag || 'master'}}
34+
local-exclude: ${{ steps.builder-tag.outputs.local-exclude || ''}}
3435

3536
env:
3637
DEFAULT_BUILDER_TAG: master
@@ -69,6 +70,12 @@ jobs:
6970
echo "collector-builder-tag=${COLLECTOR_BUILDER_TAG}" >> "$GITHUB_OUTPUT"
7071
echo "build-image=true" >> "$GITHUB_OUTPUT"
7172
73+
- name: Check arches for local build
74+
if: ! contains(inputs.architectures, 'ppc64le')
75+
id: arch
76+
run: |
77+
echo "local-exclude=[{arch:ppc64le}]" >> "$GITHUB_OUTPUT"
78+
7279
build-builder-image:
7380
name: Local builder image
7481
# Multiarch builds sometimes take for eeeeeeeeeever
@@ -80,8 +87,7 @@ jobs:
8087
strategy:
8188
matrix:
8289
arch: [amd64, arm64, ppc64le]
83-
exclude:
84-
- arch: ${{ contains(inputs.architectures, 'ppc64le') && '' || 'ppc64le' }}
90+
exclude: ${{ fromJSON(needs.builder-needs-rebuilding.outputs.local-exclude) }}
8591
runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }}
8692

8793
env:

.github/workflows/collector.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,25 @@ env:
3333
ADDRESS_SANITIZER: ${{ contains(github.event.pull_request.labels.*.name, 'address-sanitizer') }}
3434

3535
jobs:
36+
prepare-build-collector:
37+
name: Prepare builders for collector
38+
runs-on: ubuntu-24.04
39+
outputs:
40+
local-exclude: ${{ steps.arch.outputs.local-exclude || '' }}
41+
42+
steps:
43+
- name: Check arches for local build
44+
if: ! contains(inputs.architectures, 'ppc64le')
45+
id: arch
46+
run: echo "local-exclude=[{arch:ppc64le}]" >> "$GITHUB_OUTPUT"
47+
3648
build-collector-image:
3749
name: Local collector image ${{ matrix.arch }}
50+
needs: prepare-build-collector
3851
strategy:
3952
matrix:
4053
arch: [amd64, arm64, ppc64le]
41-
exclude:
42-
- arch: ${{ contains(inputs.architectures, 'ppc64le') && '' || 'ppc64le' }}
54+
exclude: ${{ fromJSON(needs.prepare-build-collector.outputs.local-exclude) }}
4355
runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }}
4456

4557
env:

0 commit comments

Comments
 (0)