Skip to content

Commit

Permalink
Jit GitHub Action shouldn't always fail if cannot checkout the code […
Browse files Browse the repository at this point in the history
…sc-22033]
  • Loading branch information
agmond committed Dec 10, 2023
1 parent e4633e9 commit c5ff790
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
description: "fail control when finding is found"
required: false
default: "true"
fail_if_cannot_checkout:
description: "fail control if cannot checkout original repo"
required: false
default: "true"
inline_environment:
description: "inline environment variables to be passed to the container"
required: false
Expand Down Expand Up @@ -120,7 +124,7 @@ runs:

- name: Exit if checkout failure is fatal
shell: bash
if: steps.checkout-original-repo.outcome == 'failure' && fromJSON(github.event.inputs.client_payload).payload.workflow_job_name != 'enrich'
if: steps.checkout-original-repo.outcome == 'failure' && fromJSON(github.event.inputs.client_payload).payload.workflow_job_name != 'enrich' && inputs.fail_if_cannot_checkout == 'true'
run: |
echo "(error) Original repo checkout failed, can't continue job execution"
exit 102
Expand Down

0 comments on commit c5ff790

Please sign in to comment.