From c7395970df5a7980d21541fe4946f719dea4df40 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Tue, 14 Mar 2023 15:08:40 -0500 Subject: [PATCH] github/workflows: fix failure conditions It turns out that you actually have to add failure() to each condition otherwise a default status check of success() is applied (thanks github). Looks redundant but whatever. Thanks to @kasper93 for actually reading the documentation. --- .github/workflows/build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3250162fa2..d7803aa0ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: TARGET: ${{ matrix.target }} - name: Print meson log - if: steps.build.outcome == 'failure' + if: ${{ failure() && steps.build.outcome == 'failure' }} run: | cat ./build/meson-logs/meson-log.txt @@ -56,7 +56,7 @@ jobs: TARGET: ${{ matrix.target }} - name: Print waf log - if: steps.build_waf.outcome == 'failure' + if: ${{ failure() && steps.build_waf.outcome == 'failure' }} run: | cat ./build_waf/config.log @@ -96,7 +96,7 @@ jobs: TRAVIS_OS_NAME: "${{ matrix.os }}" - name: Print meson log - if: steps.build.outcome == 'failure' + if: ${{ failure() && steps.build.outcome == 'failure' }} run: | cat ./build/meson-logs/meson-log.txt @@ -106,7 +106,7 @@ jobs: meson test -C build - name: Print meson test log - if: steps.tests.outcome == 'failure' + if: ${{ failure() && steps.tests.outcome == 'failure' }} run: | cat ./build/meson-logs/testlog.txt @@ -119,7 +119,7 @@ jobs: TRAVIS_OS_NAME: "${{ matrix.os }}" - name: Print waf log - if: steps.build_waf.outcome == 'failure' + if: ${{ failure() && steps.build_waf.outcome == 'failure' }} run: | cat ./build_waf/config.log @@ -149,7 +149,7 @@ jobs: ./ci/build-tumbleweed.sh meson - name: Print meson log - if: steps.build.outcome == 'failure' + if: ${{ failure() && steps.build.outcome == 'failure' }} run: | cat ./build/meson-logs/meson-log.txt @@ -159,7 +159,7 @@ jobs: meson test -C build - name: Print meson test log - if: steps.tests.outcome == 'failure' + if: ${{ failure() && steps.tests.outcome == 'failure' }} run: | cat ./build/meson-logs/testlog.txt @@ -169,7 +169,7 @@ jobs: ./ci/build-tumbleweed.sh waf - name: Print waf log - if: steps.build_waf.outcome == 'failure' + if: ${{ failure() && steps.build_waf.outcome == 'failure' }} run: | cat ./build_waf/config.log @@ -290,7 +290,7 @@ jobs: ./ci/build-msys2.sh meson - name: Print meson log - if: steps.build.outcome == 'failure' + if: ${{ failure() && steps.build.outcome == 'failure' }} run: | cat ./build/meson-logs/meson-log.txt @@ -300,7 +300,7 @@ jobs: meson test -C build - name: Print meson test log - if: steps.tests.outcome == 'failure' + if: ${{ failure() && steps.tests.outcome == 'failure' }} run: | cat ./build/meson-logs/testlog.txt @@ -310,6 +310,6 @@ jobs: ./ci/build-msys2.sh waf - name: Print waf log - if: steps.build_waf.outcome == 'failure' + if: ${{ failure() && steps.build_waf.outcome == 'failure' }} run: | cat ./build_waf/config.log