From 757df34fefa47e3e6d1dc5ce534a113b233dbb1a Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Fri, 1 Nov 2024 21:22:18 -0400 Subject: [PATCH] handle defaults --- .github/workflows/build-image-beta.yml | 23 ++++++---------------- .github/workflows/build-image-latest.yml | 25 ++++++------------------ .github/workflows/build-image-stable.yml | 24 ++++++----------------- 3 files changed, 18 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build-image-beta.yml b/.github/workflows/build-image-beta.yml index 5f926f78a4f..8f8d7c84182 100644 --- a/.github/workflows/build-image-beta.yml +++ b/.github/workflows/build-image-beta.yml @@ -18,33 +18,22 @@ on: workflow_dispatch: inputs: base_name: - default: 'bluefin' + description: 'Image Brand to Build' + default: '["bluefin"]' type: choice options: - - bluefin - - aurora + - '["bluefin"]' + - '["aurora"]' + - '["bluefin", "aurora"]' jobs: build-image-beta: - if: github.event_name != 'workflow_dispatch' name: Build Beta Images uses: ./.github/workflows/reusable-build.yml secrets: inherit strategy: matrix: - base_name: [bluefin, aurora] + base_name: ${{ fromJson(inputs.base_name) || fromJson('["bluefin", "aurora"]') }} with: base_name: ${{ matrix.base_name }} fedora_version: beta - - build-image-beta-call: - if: github.event_name == 'workflow_dispatch' - name: Build Latest Images - uses: ./.github/workflows/reusable-build.yml - secrets: inherit - strategy: - matrix: - base_name: [bluefin, aurora] - with: - base_name: ${{ inputs.base_name }} - fedora_version: latest diff --git a/.github/workflows/build-image-latest.yml b/.github/workflows/build-image-latest.yml index 3509e11eb0e..f20f2ba2deb 100644 --- a/.github/workflows/build-image-latest.yml +++ b/.github/workflows/build-image-latest.yml @@ -18,35 +18,22 @@ on: workflow_dispatch: inputs: base_name: - default: 'bluefin' + description: 'Image Brand to Build' + default: '["bluefin"]' type: choice options: - - bluefin - - aurora + - '["bluefin"]' + - '["aurora"]' + - '["bluefin", "aurora"]' jobs: build-image-latest: - if: github.event_name != 'workflow_dispatch' name: Build Latest Images uses: ./.github/workflows/reusable-build.yml secrets: inherit strategy: matrix: - base_name: [bluefin, aurora] + base_name: ${{ fromJson(inputs.base_name) || fromJson('["bluefin", "aurora"]') }} with: - image_flavors: "['main', 'nvidia', 'hwe', 'hwe-nvidia']" base_name: ${{ matrix.base_name }} fedora_version: latest - - build-image-latest-call: - if: github.event_name == 'workflow_dispatch' - name: Build Latest Images - uses: ./.github/workflows/reusable-build.yml - secrets: inherit - strategy: - matrix: - base_name: [bluefin, aurora] - with: - image_flavors: "['main', 'nvidia', 'hwe', 'hwe-nvidia']" - base_name: ${{ inputs.base_name }} - fedora_version: latest diff --git a/.github/workflows/build-image-stable.yml b/.github/workflows/build-image-stable.yml index e9d070cfec8..327325b2baa 100644 --- a/.github/workflows/build-image-stable.yml +++ b/.github/workflows/build-image-stable.yml @@ -12,34 +12,22 @@ on: workflow_dispatch: inputs: base_name: - default: 'bluefin' + description: 'Image Brand to Build' + default: '["bluefin"]' type: choice options: - - bluefin - - aurora + - '["bluefin"]' + - '["aurora"]' + - '["bluefin", "aurora"]' jobs: build-image-stable: - if: github.event_name != 'workflow_dispatch' name: Build Stable Images uses: ./.github/workflows/reusable-build.yml secrets: inherit strategy: matrix: - base_name: [bluefin, aurora] + base_name: ${{ fromJson(inputs.base_name) || fromJson('["bluefin", "aurora"]') }} with: base_name: ${{ matrix.base_name }} fedora_version: stable - - build-image-stable-call: - if: github.event_name == 'workflow_dispatch' - name: Build Latest Images - uses: ./.github/workflows/reusable-build.yml - secrets: inherit - strategy: - matrix: - base_name: [bluefin, aurora] - with: - base_name: ${{ inputs.base_name }} - fedora_version: latest -