Skip to content

Commit

Permalink
skip disabled workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-uk committed Oct 28, 2022
1 parent f9d8d79 commit 829745d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,10 @@ function run() {
}
catch (error) {
const e = error;
if (e.message.endsWith('a disabled workflow')) {
core.warning('WARNING! Workflow is disabled, no action was taken');
return;
}
core.setFailed(e.message);
}
});
Expand Down
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ async function run(): Promise<void> {
core.setOutput('workflowId', foundWorkflow.id)
} catch (error) {
const e = error as Error

if(e.message.endsWith('a disabled workflow')){
core.warning('WARNING! Workflow is disabled, no action was taken')
return
}

core.setFailed(e.message)
}
}
Expand Down

0 comments on commit 829745d

Please sign in to comment.