From 9e55c5d597b3115d0e2cf80023b97355e0164d22 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Fri, 8 Sep 2023 20:49:11 +0200 Subject: [PATCH] .github/workflows: Don't execute FTPUpload job on workflow cancel The FTPUpload job is responsible for storing the job artefacts of all jobs regardless if the jobs passed or failed. But we don't need to store the artefacts if the job was cancelled. This avoids a failed job in case of cancellation and also the nagging email from github actions. --- .github/workflows/build-pr.yml | 2 +- .github/workflows/build-release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 105d8eebf5..0a0bbeb5b1 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -229,7 +229,7 @@ jobs: FTPUpload: name: 📦 FTP Upload Artifacts runs-on: [ self-hosted, Linux, Docker ] - if: always() && !inputs.is_called_workflow + if: ${{ !cancelled() && !inputs.is_called_workflow}} needs: # All jobs that create new artifacts - BuildInstaller diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 6050f3d021..74bd7372fe 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -126,7 +126,7 @@ jobs: FTPUpload: name: 📦 FTP Upload Artifacts runs-on: [ self-hosted, Linux, Docker ] - if: always() + if: ${{ !cancelled() }} needs: # All jobs that create new artifacts - CallPR