File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change
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_aio :
17
+ description : " AiO runner name"
18
+ value : ${{ jobs.define_runner.outputs.aio-runner }}
19
+
20
+ jobs :
21
+ define_runner :
22
+ environment : ${{ inputs.runner_env }}
23
+ runs-on : ubuntu-latest
24
+ outputs :
25
+ image-build-runner : ${{ vars.RUNS_ON_TARGET_IMAGE_BUILDER }}
26
+ aio-runner : ${{ vars.RUNS_ON_TARGET_AIO }}
Original file line number Diff line number Diff line change @@ -113,11 +113,26 @@ jobs:
113
113
run : |
114
114
echo "Environment variable RUNS_ON_TARGET_IMAGE_BUILDER: ${{ vars.RUNS_ON_TARGET_IMAGE_BUILDER }}"
115
115
116
+ # This is because there is a bug where the runs-on target cannot be dynamically set using environment variables.
117
+ - name : Generate runs-on target based on environment
118
+ uses : ./.github/workflows/runs-on-preq.yml
119
+
120
+ # runner-preqs:
121
+ # name: Generate runs-on target based on environment
122
+ # runs-on: ubuntu-latest
123
+ # steps:
124
+ # - name: Checkout
125
+ # uses: actions/checkout@v4
126
+ # # This is because there is a bug where the runs-on target cannot be dynamically set using environment variables.
127
+ # - name: Call setup workflow
128
+ # uses: ./.github/workflows/runs-on-preq.yml
129
+
130
+
116
131
container-image-build :
117
132
name : Build Kolla container images
118
133
if : github.repository == 'stackhpc/stackhpc-kayobe-config'
119
134
environment : ${{ inputs.runner_env }}
120
- runs-on : ${{ vars.RUNS_ON_TARGET_IMAGE_BUILDER }}
135
+ runs-on : ${{ needs.generate-tag.outputs.runner_name_image_build }}
121
136
timeout-minutes : 720
122
137
permissions : {}
123
138
strategy :
You can’t perform that action at this time.
0 commit comments