diff --git a/.github/workflows/collector-builder.yml b/.github/workflows/collector-builder.yml index b43f02ce01..d8e7aba29a 100644 --- a/.github/workflows/collector-builder.yml +++ b/.github/workflows/collector-builder.yml @@ -23,7 +23,7 @@ jobs: name: Determine if builder image needs to be built runs-on: ubuntu-24.04 outputs: - build-image: ${{ steps.check-builder.outputs.builder-image }} + build-image: ${{ steps.check-builder.outputs.build-image }} build-multiarch: ${{ steps.run-multiarch.outputs.run-multiarch }} collector-builder-tag: ${{ steps.builder-tag.outputs.collector-builder-tag }} @@ -58,7 +58,7 @@ jobs: run: | set -x function build_builder() { - echo "build-image=$1" == "$GITHUB_OUTPUT" + echo "build-image=$1" >> "$GITHUB_OUTPUT" exit 0 } @@ -90,11 +90,11 @@ jobs: run: | set -x function run_multiarch() { - echo "run-multiarch=true" >> "$GITHUB_OUTPUT" + echo "run-multiarch=$1" >> "$GITHUB_OUTPUT" exit 0 } - if [[ "${{ steps.check-builder.outputs.build-builder }}" == "false" ]]; then + if [[ "${{ steps.check-builder.outputs.build-image }}" == "false" ]]; then run_multiarch "false" fi @@ -250,11 +250,7 @@ jobs: - build-builder-image-remote-vm name: Create Multiarch manifest runs-on: ubuntu-24.04 - if: | - github.event_name != 'pull_request' || ( - needs.builder-needs-rebuilding.outputs.collector-builder-tag != 'master' && - contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds') - ) + if : needs.builder-needs-rebuilding.outputs.build-multiarch == 'true' env: COLLECTOR_BUILDER_TAG: ${{ needs.builder-needs-rebuilding.outputs.collector-builder-tag }} ARCHS: amd64 ppc64le s390x arm64 @@ -294,10 +290,7 @@ jobs: - build-builder-image name: Retag x86 builder image runs-on: ubuntu-24.04 - if: | - github.event_name == 'pull_request' && - needs.builder-needs-rebuilding.outputs.collector-builder-tag != 'master' && - !contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds') + if : needs.builder-needs-rebuilding.outputs.build-multiarch == 'false' env: COLLECTOR_BUILDER_TAG: ${{ needs.builder-needs-rebuilding.outputs.collector-builder-tag }} steps: