From 067aa19eae7b4801b58ed6ea6bb9e1388b1e8dd0 Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Mon, 25 Mar 2024 10:18:28 -0400 Subject: [PATCH] fix(ci): update logic check in reuseable pipeline so that it is always green for expected cases --- .github/workflows/reusable_dockerfile_pipeline.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable_dockerfile_pipeline.yml b/.github/workflows/reusable_dockerfile_pipeline.yml index 1a1da6c..4f6b224 100644 --- a/.github/workflows/reusable_dockerfile_pipeline.yml +++ b/.github/workflows/reusable_dockerfile_pipeline.yml @@ -113,8 +113,9 @@ jobs: # yamllint enable # Log the key inputs to the logic as well a the outputs. We check that - # build_for_pr and build_for_merge are never equal as that would indicate a - # bug. + # build_for_pr and build_for_merge are never equal when they are true as that + # would indicate a bug. If they are both false, this is ok, as this is the + # case on pushing commits to a PR. logic-check: needs: prepare-env runs-on: "ubuntu-latest" @@ -129,7 +130,9 @@ jobs: echo "build_for_merge: ${{ needs.prepare-env.outputs.build_for_merge }}" echo "not_a_fork: ${{ needs.prepare-env.outputs.not_a_fork }}" - name: Check logic - if: ${{ needs.prepare-env.outputs.build_for_pr == needs.prepare-env.outputs.build_for_merge }} + if: | + (needs.prepare-env.outputs.build_for_pr == needs.prepare-env.outputs.build_for_merge) + && needs.prepare-env.outputs.build_for_pr != 'false' run: | echo "Failing step due to build_for_pr == build_for_merge" exit 1