From 8f9d516ee9348251bbd17d78a261203c4b532fbc Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 11 Apr 2024 19:14:26 -0400 Subject: [PATCH] Don't fail if the post step has an exception --- dist/main.js | 4 +++- src/main.ts | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dist/main.js b/dist/main.js index c202029..008110b 100644 --- a/dist/main.js +++ b/dist/main.js @@ -119,7 +119,9 @@ export class IdsToolbox { ? error.toString() : JSON.stringify(error); this.addFact(FACT_FINAL_EXCEPTION, reportable); - actionsCore.setFailed(reportable); + if (this.executionPhase !== "post") { + actionsCore.setFailed(reportable); + } this.recordEvent(EVENT_EXCEPTION); } finally { diff --git a/src/main.ts b/src/main.ts index 84865a3..61a9176 100644 --- a/src/main.ts +++ b/src/main.ts @@ -200,7 +200,11 @@ export class IdsToolbox { : JSON.stringify(error); this.addFact(FACT_FINAL_EXCEPTION, reportable); - actionsCore.setFailed(reportable); + + if (this.executionPhase !== "post") { + actionsCore.setFailed(reportable); + } + this.recordEvent(EVENT_EXCEPTION); } finally { await this.complete();