From 169224b364403347bf9974b366546a34f72422d4 Mon Sep 17 00:00:00 2001 From: lea Date: Mon, 8 Jul 2024 20:03:16 -0700 Subject: [PATCH] ci: custom runner option for custom build workflow call (#1419) (#1436) (cherry picked from commit 42ccbc766530da8bfdd8cd72d2c9445e6a3578c4) # Conflicts: # .github/workflows/build.yml Co-authored-by: Cappy Ishihara --- .github/workflows/build.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7bd55ee66b..90843062d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,11 +5,16 @@ on: packages: description: "Packages to Build" required: true + custom_builder: + description: "Custom Builder" + required: false + default: "" jobs: parse: outputs: pkgs: ${{ steps.parsing.outputs.pkgs }} + builder: ${{ inputs.custom_builder }} runs-on: "ubuntu-latest" steps: - name: Parse Input @@ -22,9 +27,9 @@ jobs: matrix: pkg: ${{ fromJson(needs.parse.outputs.pkgs) }} version: ["rawhide"] - arch: ["x86_64", "aarch64"] + arch: ${{ output.builder == "x86-64-lg" && ["x86_64"] || ["x86_64", "aarch64"] }} fail-fast: false - runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }} + runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || output.builder && output.builder || 'ubuntu-latest' }} container: image: ghcr.io/terrapkg/builder:f${{ matrix.version }} options: --cap-add=SYS_ADMIN --privileged