From 3c3896596e8ce325de8b4414c509541ec866e7bf Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Fri, 3 Jun 2022 10:58:09 +0200 Subject: [PATCH] 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 https://github.com/actions/runner/issues/1483 for more details. --- .github/workflows/container-image-build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/container-image-build.yml b/.github/workflows/container-image-build.yml index 883133a8a..d04e1e001 100644 --- a/.github/workflows/container-image-build.yml +++ b/.github/workflows/container-image-build.yml @@ -88,17 +88,17 @@ jobs: kayobe overcloud container image build ${{ github.event.inputs.regexes }} --push env: KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }} - if: github.event.inputs.overcloud + if: github.event.inputs.overcloud == 'true' - name: Display the overcloud container image tag run: | echo "$(cat ~/kolla_tag)" - if: github.event.inputs.overcloud + if: github.event.inputs.overcloud == 'true' - name: Get built overcloud container images run: | sudo docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:$(cat ~/kolla_tag)" > overcloud-container-images - if: github.event.inputs.overcloud + if: github.event.inputs.overcloud == 'true' - name: Upload overcloud-container-images artifact uses: actions/upload-artifact@v3 @@ -106,7 +106,7 @@ jobs: name: Overcloud container images path: overcloud-container-images retention-days: 7 - if: github.event.inputs.overcloud + if: github.event.inputs.overcloud == 'true' - name: Build and push kolla seed images run: | @@ -115,17 +115,17 @@ jobs: kayobe seed container image build --push env: KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }} - if: github.event.inputs.seed + if: github.event.inputs.seed == 'true' - name: Display the seed container image tag run: | echo "$(cat ~/kolla_tag)" - if: github.event.inputs.seed + if: github.event.inputs.seed == 'true' - name: Get built seed container images run: | sudo docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:$(cat ~/kolla_tag)" > seed-container-images - if: github.event.inputs.seed + if: github.event.inputs.seed == 'true' - name: Upload seed-container-images artifact uses: actions/upload-artifact@v3 @@ -133,7 +133,7 @@ jobs: name: Seed container images path: seed-container-images retention-days: 7 - if: github.event.inputs.seed + if: github.event.inputs.seed == 'true' - name: Prune local Kolla container images run: |