Skip to content

Commit 83439bb

Browse files
committed
Try moving condition to called workflows
1 parent d1c26d7 commit 83439bb

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ on:
4343
description: Name of cloud in clouds.yaml
4444
type: string
4545
required: true
46+
if:
47+
description: Whether to run the workflow (workaround for required status checks issue)
48+
type: boolean
49+
default: true
4650
secrets:
4751
KAYOBE_VAULT_PASSWORD:
4852
required: true
@@ -57,6 +61,7 @@ jobs:
5761
# NOTE: Runner needs unzip and nodejs packages.
5862
all-in-one:
5963
name: All in one
64+
if: ${{ inputs.if }}
6065
runs-on: [self-hosted, stackhpc-kayobe-config-aio]
6166
permissions: {}
6267
env:

.github/workflows/stackhpc-build-kayobe-image.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
no_proxy:
1717
type: string
1818
required: false
19+
if:
20+
description: Whether to run the workflow (workaround for required status checks issue)
21+
type: boolean
22+
default: true
1923
outputs:
2024
kayobe_image:
2125
description: Reference of Kayobe image that was built
@@ -28,6 +32,7 @@ env:
2832
jobs:
2933
build-kayobe-image:
3034
name: Build kayobe image
35+
if: ${{ inputs.if }}
3136
runs-on: ubuntu-20.04
3237
permissions:
3338
contents: read

.github/workflows/stackhpc-pull-request.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ jobs:
6161
needs:
6262
- check-changes
6363
uses: ./.github/workflows/stackhpc-build-kayobe-image.yml
64-
if: needs.check-changes.outputs.aio == 'true'
64+
with:
65+
if: needs.check-changes.outputs.aio == 'true'
6566

6667
all-in-one-centos-ovs:
6768
name: aio (CentOS OVS)
@@ -72,8 +73,8 @@ jobs:
7273
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
7374
neutron_plugin: ovs
7475
OS_CLOUD: sms-lab-release
76+
if: needs.check-changes.outputs.aio == 'true'
7577
secrets: inherit
76-
if: needs.check-changes.outputs.aio == 'true'
7778

7879
all-in-one-centos-ovn:
7980
name: aio (CentOS OVN)
@@ -84,8 +85,8 @@ jobs:
8485
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
8586
neutron_plugin: ovn
8687
OS_CLOUD: sms-lab-release
88+
if: needs.check-changes.outputs.aio == 'true'
8789
secrets: inherit
88-
if: needs.check-changes.outputs.aio == 'true'
8990

9091
all-in-one-rocky-ovs:
9192
name: aio (Rocky OVS)
@@ -101,8 +102,8 @@ jobs:
101102
vm_image: Rocky8-2022-11-08
102103
vm_interface: ens3
103104
OS_CLOUD: sms-lab-release
105+
if: needs.check-changes.outputs.aio == 'true'
104106
secrets: inherit
105-
if: needs.check-changes.outputs.aio == 'true'
106107

107108
all-in-one-rocky-ovn:
108109
name: aio (Rocky OVN)
@@ -118,8 +119,8 @@ jobs:
118119
vm_image: Rocky8-2022-11-08
119120
vm_interface: ens3
120121
OS_CLOUD: sms-lab-release
122+
if: needs.check-changes.outputs.aio == 'true'
121123
secrets: inherit
122-
if: needs.check-changes.outputs.aio == 'true'
123124

124125
all-in-one-ubuntu-ovs:
125126
name: aio (Ubuntu OVS)
@@ -132,8 +133,8 @@ jobs:
132133
neutron_plugin: ovs
133134
vm_image: Ubuntu-20.04
134135
OS_CLOUD: sms-lab-release
136+
if: needs.check-changes.outputs.aio == 'true'
135137
secrets: inherit
136-
if: needs.check-changes.outputs.aio == 'true'
137138

138139
all-in-one-ubuntu-ovn:
139140
name: aio (Ubuntu OVN)
@@ -146,5 +147,5 @@ jobs:
146147
neutron_plugin: ovn
147148
vm_image: Ubuntu-20.04
148149
OS_CLOUD: sms-lab-release
150+
if: needs.check-changes.outputs.aio == 'true'
149151
secrets: inherit
150-
if: needs.check-changes.outputs.aio == 'true'

0 commit comments

Comments
 (0)