Skip to content

Commit

Permalink
.github/workflows: Don't execute FTPUpload job on workflow cancel
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
t-b committed Sep 8, 2023
1 parent ba69a12 commit 9e55c5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e55c5d

Please sign in to comment.