From 4cd78e239bf13f4197516acf915f2a3b009dd706 Mon Sep 17 00:00:00 2001 From: Nicola Sella Date: Thu, 14 Sep 2023 15:52:30 +0200 Subject: [PATCH] Add condition to run a clean build only when cache fails --- .github/workflows/ccache-build.yml | 1 + .github/workflows/ci.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ccache-build.yml b/.github/workflows/ccache-build.yml index 4bc99090b..a83d616a6 100644 --- a/.github/workflows/ccache-build.yml +++ b/.github/workflows/ccache-build.yml @@ -69,6 +69,7 @@ jobs: run: CXX=${{ steps.configure_compiler.outputs.cxx }} CC=${{ steps.configure_compiler.outputs.cc }} cmake -S . -B build - name: Build DNF5 + id: build run: cmake --build build - name: Display CCache statistics diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7052df44..dbadb25c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,7 @@ on: jobs: package-build: name: Package Build + if: ${{ always() && contains(ccache-build.build.result, 'failure') }} runs-on: ubuntu-latest container: ghcr.io/rpm-software-management/dnf-ci-host strategy: