Skip to content

Commit 3c38965

Browse files
committed
Fix evaluation of step conditions
Despite specifying the boolean type for inputs, GitHub workflow variables are actually strings so 'false' evaluates to true. This was causing the seed container image build to always be executed. See actions/runner#1483 for more details.
1 parent 2b606e9 commit 3c38965

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,25 +88,25 @@ jobs:
8888
kayobe overcloud container image build ${{ github.event.inputs.regexes }} --push
8989
env:
9090
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
91-
if: github.event.inputs.overcloud
91+
if: github.event.inputs.overcloud == 'true'
9292

9393
- name: Display the overcloud container image tag
9494
run: |
9595
echo "$(cat ~/kolla_tag)"
96-
if: github.event.inputs.overcloud
96+
if: github.event.inputs.overcloud == 'true'
9797

9898
- name: Get built overcloud container images
9999
run: |
100100
sudo docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:$(cat ~/kolla_tag)" > overcloud-container-images
101-
if: github.event.inputs.overcloud
101+
if: github.event.inputs.overcloud == 'true'
102102

103103
- name: Upload overcloud-container-images artifact
104104
uses: actions/upload-artifact@v3
105105
with:
106106
name: Overcloud container images
107107
path: overcloud-container-images
108108
retention-days: 7
109-
if: github.event.inputs.overcloud
109+
if: github.event.inputs.overcloud == 'true'
110110

111111
- name: Build and push kolla seed images
112112
run: |
@@ -115,25 +115,25 @@ jobs:
115115
kayobe seed container image build --push
116116
env:
117117
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
118-
if: github.event.inputs.seed
118+
if: github.event.inputs.seed == 'true'
119119

120120
- name: Display the seed container image tag
121121
run: |
122122
echo "$(cat ~/kolla_tag)"
123-
if: github.event.inputs.seed
123+
if: github.event.inputs.seed == 'true'
124124

125125
- name: Get built seed container images
126126
run: |
127127
sudo docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:$(cat ~/kolla_tag)" > seed-container-images
128-
if: github.event.inputs.seed
128+
if: github.event.inputs.seed == 'true'
129129

130130
- name: Upload seed-container-images artifact
131131
uses: actions/upload-artifact@v3
132132
with:
133133
name: Seed container images
134134
path: seed-container-images
135135
retention-days: 7
136-
if: github.event.inputs.seed
136+
if: github.event.inputs.seed == 'true'
137137

138138
- name: Prune local Kolla container images
139139
run: |

0 commit comments

Comments
 (0)