From e6a119591a180128ca8074f588e9e3f694376743 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Thu, 20 Jun 2024 15:07:50 +0100 Subject: [PATCH] Only rebuild the image when the code hasn't changed Refs https://github.com/actions/runner/issues/491#issuecomment-926924523 --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b4821e..18a7650 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,7 @@ jobs: name: 'Format' runs-on: ubuntu-22.04 timeout-minutes: 30 + if: github.event_name != 'schedule' steps: - name: 'Checkout code' @@ -70,7 +71,7 @@ jobs: name: 'Push image' runs-on: ubuntu-22.04 timeout-minutes: 30 - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' && !failure() && !cancelled() outputs: image: ${{ steps.image.outputs.image }} needs: