Skip to content

Commit 8c8d8e7

Browse files
committed
Renaming for clarity
1 parent 5eb87fd commit 8c8d8e7

File tree

3 files changed

+56
-8
lines changed

3 files changed

+56
-8
lines changed

.github/workflows/ipa-image-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ env:
3434
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
3535

3636
jobs:
37-
runner-preqs:
38-
uses: ./.github/workflows/runs-on-preq.yml
37+
runner-selection:
38+
uses: ./.github/workflows/runner-selector.yml
3939
with:
4040
runner_env: ${{ inputs.runner_env }}
4141
ipa-image-build:
4242
name: Build IPA images
4343
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
4444
environment: ${{ inputs.runner_env }}
45-
runs-on: ${{ needs.runner-preqs.outputs.runner_name_image_build }}
45+
runs-on: ${{ needs.runner-selection.outputs.runner_name_image_build }}
4646
needs:
47-
- runner-preqs
47+
- runner-selection
4848
permissions: {}
4949
steps:
5050
- name: Install Package

.github/workflows/overcloud-host-image-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ env:
3333
KAYOBE_ENVIRONMENT: ci-builder
3434
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
3535
jobs:
36-
runner-preqs:
37-
uses: ./.github/workflows/runs-on-preq.yml
36+
runner-selection:
37+
uses: ./.github/workflows/runner-selector.yml
3838
with:
3939
runner_env: ${{ inputs.runner_env }}
4040
overcloud-host-image-build:
4141
name: Build overcloud host images
4242
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
4343
environment: ${{ inputs.runner_env }}
44-
runs-on: ${{ needs.runner-preqs.outputs.runner_name_image_build }}
44+
runs-on: ${{ needs.runner-selection.outputs.runner_name_image_build }}
4545
needs:
46-
- runner-preqs
46+
- runner-selection
4747
permissions: {}
4848
steps:
4949
- name: Validate inputs
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: Create output for `runs-on` variable
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
runner_env:
8+
description: 'The environment input from caller workflow'
9+
default: 'SMS Lab'
10+
required: True
11+
type: string
12+
outputs:
13+
runner_name_image_build:
14+
description: "Image builder runner name"
15+
value: ${{ jobs.define_runner.outputs.image-build-runner }}
16+
runner_name_container_image_build:
17+
description: "Container image build runner name"
18+
value: ${{ jobs.define_runner.outputs.container-image-build-runner }}
19+
runner_name_aio:
20+
description: "AiO runner name"
21+
value: ${{ jobs.define_runner.outputs.aio-runner }}
22+
23+
jobs:
24+
define_runner:
25+
environment: ${{ inputs.runner_env }}
26+
runs-on: ubuntu-latest
27+
outputs:
28+
image-build-runner: ${{ steps.builder-runner.outputs.runner_name_image_build }}
29+
container-image-build-runner: ${{ steps.container-image-build-runner.outputs.runner_name_container_image_build }}
30+
aio-runner: ${{ steps.aio-runner.outputs.runner_name_aio }}
31+
steps:
32+
- name: Set output for image builder runner
33+
run: echo "Setting runner for ${{ inputs.runner_env }} -> ${{ vars.RUNS_ON_TARGET_IMAGE_BUILDER }}"
34+
35+
- id: builder-runner
36+
run: echo "runner_name_image_build=${{ vars.RUNS_ON_TARGET_IMAGE_BUILDER }}" >> $GITHUB_OUTPUT
37+
38+
- name: Set output for container image build runner
39+
run: echo "Setting runner for ${{ inputs.runner_env }} -> ${{ vars.RUNS_ON_TARGET_CONTAINER_IMAGE_BUILDER }}"
40+
41+
- id: container-image-build-runner
42+
run: echo "runner_name_container_image_build=${{ vars.RUNS_ON_TARGET_CONTAINER_IMAGE_BUILDER }}" >> $GITHUB_OUTPUT
43+
44+
- name: Set output for aio runner
45+
run: echo "Setting runner for ${{ inputs.runner_env }} -> ${{ vars.RUNS_ON_TARGET_AIO }}"
46+
47+
- id: aio-runner
48+
run: echo "runner_name_aio=${{ vars.RUNS_ON_TARGET_AIO }}" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)