Skip to content

Commit

Permalink
Fail the job if any steps have errors
Browse files Browse the repository at this point in the history
Previously this logic only failed the job if the last step had an error.
  • Loading branch information
wadells committed Nov 28, 2023
1 parent bc1410a commit 751aec5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async function run() {
jobHasError = runAssertions(uses, allowlist, isDryRun);
} else if (steps !== undefined) {
for (const step of steps) {
jobHasError = runAssertions(step['uses'], allowlist, isDryRun);
jobHasError ||= runAssertions(step['uses'], allowlist, isDryRun);
}
} else {
core.warning(`The "${job}" job of the "${basename}" workflow does not contain uses or steps.`);
Expand Down

0 comments on commit 751aec5

Please sign in to comment.